[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#750378: marked as done (freebsd-buildutils: Conflicting declarations of struct _node may result in invalid access)



Your message dated Fri, 26 Jul 2024 18:42:08 +0000
with message-id <[🔎] E1sXPtI-005bO3-Kb@fasolo.debian.org>
and subject line Bug#1072228: Removed package(s) from unstable
has caused the Debian Bug report #750378,
regarding freebsd-buildutils: Conflicting declarations of struct _node may result in invalid access
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
750378: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=750378
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: freebsd-buildutils
Version: 10.0-4
Usertags: goto-cc

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.

[...]
gcc -O2 -g -Wall -D_GNU_SOURCE -DMACHINE_ARCH='"amd64"' -DMACHINE_MULTIARCH='"x86_64-linux-gnu"' -I/srv/jenkins-slave/workspace/sid-goto-cc-freebsd-buildutils/freebsd-buildutils-10.0/build-tree/src/sys -D_GNU_SOURCE=1 -isystem /usr/include/freebsd  -std=gnu99 -fstack-protector   -o fmtree compare.o crc.o create.o excludes.o misc.o mtree.o spec.o verify.o specspec.o -lbsd

error: conflicting function declarations "mtree_readspec"
old definition in module spec file spec.c line 58
struct _node * (struct _IO_FILE *fi)
new definition in module specspec file extern.h line 44
struct _node * (struct _IO_FILE *)

reason for conflict in types listed below (struct/struct):
composite type component counts differ (22/21)
struct _node {
  struct _node * parent;
  struct _node * child;
  struct _node * prev;
  struct _node * next;
  signed long int st_size;
  struct timespec st_mtim;
  unsigned long int cksum;
  char * md5digest;
  char * sha1digest;
  char * sha256digest;
  char * rmd160digest;
  char * slink;
  unsigned int st_uid;
  unsigned int st_gid;
  unsigned int st_mode;
  unsigned int <padding>;
  unsigned long int st_flags;
  unsigned long int st_nlink;
  unsigned int flags;
  unsigned char type;
  char [1l] name;
  unsigned short int <padding>;
}
struct _node {
  struct _node * parent;
  struct _node * child;
  struct _node * prev;
  struct _node * next;
  signed long int st_size;
  unsigned long int cksum;
  char * md5digest;
  char * sha1digest;
  char * sha256digest;
  char * rmd160digest;
  char * slink;
  unsigned int st_uid;
  unsigned int st_gid;
  unsigned int st_mode;
  unsigned int <padding>;
  unsigned long int st_flags;
  unsigned long int st_nlink;
  unsigned int flags;
  unsigned char type;
  char [1l] name;
  unsigned short int <padding>;
}
*** Error code 64

Stop.
bmake[1]: stopped in /srv/jenkins-slave/workspace/sid-goto-cc-freebsd-buildutils/freebsd-buildutils-10.0/build-tree/src/usr.sbin/mtree
debian/rules:107: recipe for target 'build-stamp' failed
make: *** [build-stamp] Error 1

Observe the missing st_mtim field in the second declaration. Consequently the
offsets of all further members will differ, which will result in wrong (or
invalid) accesses when passing around objects between the two compilation units
(spec and specspec). Indeed this appears to be happening here:

http://sources.debian.net/src/freebsd-buildutils/10.0-4/src/usr.sbin/mtree/specspec.c?hl=249,250#L249

This is a bit of a guess, but I think it's the missing

#include <sys/stat.h>

in specspec.c that is causing this difference.

Best,
Michael

Attachment: pgpN3TS4xfzEo.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 10.3~svn296373-7.1+rm

Dear submitter,

as the package freebsd-buildutils has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/1072228

The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: