Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Steven Chamberlain
On 29/12/12 23:56, Christoph Egger wrote:
> Steven, SVN has fixes for #694374 and #695679
> already. do you intent these for wheezy?

Yes, please.

They are not RC severity but sufficiently important for release, and in
particular #695679 should be fixed for people doing squeeze->wheezy
upgrades of jail systems.

> If so let's add #696514 and
> potentially the implicit declarations and get it uploaded as well.

I think it is beneficial, yes.  And as minimal as it can be.

There are some remaining implicit declarations, but are more complex,
therefore I'm leaving those as they are and I haven't enabled the
-Werror flag for this package yet.

Thanks!
Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Christoph Egger
Christoph Egger  writes:
>   I'd like to hear -release@'s opinion on that. Do you prefer the
> smaller patch only fixing the implicit declarations/includes where we
> know it has caused this segfaults or can I upload the full change below?

Oh sorry I should read more carefull. That's of course a diff for a
different package (-utils vs -libs). I'm still inclined to also upload
-utils with that diff. Steven, SVN has fixes for #694374 and #695679
already. do you intent these for wheezy? If so let's add #696514 and
potentially the implicit declarations and get it uploaded as well.

Regards

Christoph


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Christoph Egger
Hi all!

  I'd like to hear -release@'s opinion on that. Do you prefer the
smaller patch only fixing the implicit declarations/includes where we
know it has caused this segfaults or can I upload the full change below?

Regards

Christoph

Steven Chamberlain  writes:
> This is a multi-part message in MIME format.
> --030202080401090604090105
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> On 29/12/12 16:47, Steven Chamberlain wrote:
>> I can provide a similar patch for freebsd-utils which has the same
>> issues, but the only problem I could confirm yet was a segfault in
>> ifconfig bridge configuration (#696514) due to it.
>
> Attached is a similar patch for freebsd-utils, fixing implicit
> declarations that are due to libbsd no longer being used.  Should we
> apply it?
>
> The warnings are potentially serious, but I don't know of any specific
> bugs that this will fix.  (#696514 turned out not to be due to these).
>
> Regards,
> -- 
> Steven Chamberlain
> ste...@pyro.eu.org
>
> --030202080401090604090105
> Content-Type: text/x-patch;
>  name="implicit-declaration.patch"
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment;
>  filename="implicit-declaration.patch"
>
> Index: freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/mountd/mountd.c   2012-12-29 
> 19:56:58.0 +
> +++ freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c2012-12-29 
> 20:05:01.478673213 +
> @@ -80,6 +80,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  #include "pathnames.h"
>  #include "mntopts.h"
>  
> Index: freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/vidcontrol/vidcontrol.c   
> 2010-03-29 21:12:44.0 +0100
> +++ freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c2012-12-29 
> 20:05:04.610607859 +
> @@ -48,6 +48,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  #include "path.h"
>  #include "decode.h"
>  
> Index: freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/ppp/defs.c2004-09-05 
> 02:46:52.0 +0100
> +++ freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c 2012-12-29 20:00:01.091748618 
> +
> @@ -47,6 +47,7 @@
>  #include 
>  #endif
>  #include 
> +#include 
>  
>  #if defined(__FreeBSD__) && !defined(NOKLDLOAD)
>  #include "id.h"
> Index: freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/nfsd/nfsd.c   2012-12-29 
> 19:56:58.0 +
> +++ freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c2012-12-29 
> 20:00:04.194641584 +
> @@ -71,6 +71,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  /* Global defs */
>  #ifdef DEBUG
> Index: freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/arp/arp.c 2012-12-29 
> 19:56:58.0 +
> +++ freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c  2012-12-29 20:00:07.442606898 
> +
> @@ -80,6 +80,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  typedef void (action_fn)(struct sockaddr_dl *sdl,
>   struct sockaddr_inarp *s_in, struct rt_msghdr *rtm);
> Index: freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/rpc.lockd/kern.c  2012-12-29 
> 19:56:58.0 +
> +++ freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c   2012-12-29 
> 20:00:14.848822213 +
> @@ -52,6 +52,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #include 
>  #include 
> Index: freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.sbin/pppctl/pppctl.c   2004-12-13 
> 14:50:13.0 +
> +++ freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c2012-12-29 
> 20:00:17.754640690 +
> @@ -48,6 +48,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  
>  #define LINELEN 2048
>  
> Index: freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c
> ===
> --- freebsd-utils-9.0+ds1.orig/usr.bin/kdump/kdump.c  2012-12-29 
> 19:56:58.0 +
> +++ freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c   2012-12-29 
> 20:05:19.540626059 +
> @@ -83,6 +83,8 @@
>  #include 
>  #include 
>  #include 
> +#include 
> +
>  #include "ktrace.h"
>  #include "kdump_subr.h"
>  
> Index: freebsd-utils-9.0+ds1/sbin/geom/core/geom.c
> ===
> --- freebsd-utils-9.0+d

Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Steven Chamberlain
On 29/12/12 16:47, Steven Chamberlain wrote:
> I can provide a similar patch for freebsd-utils which has the same
> issues, but the only problem I could confirm yet was a segfault in
> ifconfig bridge configuration (#696514) due to it.

Attached is a similar patch for freebsd-utils, fixing implicit
declarations that are due to libbsd no longer being used.  Should we
apply it?

The warnings are potentially serious, but I don't know of any specific
bugs that this will fix.  (#696514 turned out not to be due to these).

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org
Index: freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/mountd/mountd.c	2012-12-29 19:56:58.0 +
+++ freebsd-utils-9.0+ds1/usr.sbin/mountd/mountd.c	2012-12-29 20:05:01.478673213 +
@@ -80,6 +80,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include "pathnames.h"
 #include "mntopts.h"
 
Index: freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/vidcontrol/vidcontrol.c	2010-03-29 21:12:44.0 +0100
+++ freebsd-utils-9.0+ds1/usr.sbin/vidcontrol/vidcontrol.c	2012-12-29 20:05:04.610607859 +
@@ -48,6 +48,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include "path.h"
 #include "decode.h"
 
Index: freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/ppp/defs.c	2004-09-05 02:46:52.0 +0100
+++ freebsd-utils-9.0+ds1/usr.sbin/ppp/defs.c	2012-12-29 20:00:01.091748618 +
@@ -47,6 +47,7 @@
 #include 
 #endif
 #include 
+#include 
 
 #if defined(__FreeBSD__) && !defined(NOKLDLOAD)
 #include "id.h"
Index: freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/nfsd/nfsd.c	2012-12-29 19:56:58.0 +
+++ freebsd-utils-9.0+ds1/usr.sbin/nfsd/nfsd.c	2012-12-29 20:00:04.194641584 +
@@ -71,6 +71,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /* Global defs */
 #ifdef DEBUG
Index: freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/arp/arp.c	2012-12-29 19:56:58.0 +
+++ freebsd-utils-9.0+ds1/usr.sbin/arp/arp.c	2012-12-29 20:00:07.442606898 +
@@ -80,6 +80,7 @@
 #include 
 #include 
 #include 
+#include 
 
 typedef void (action_fn)(struct sockaddr_dl *sdl,
 	struct sockaddr_inarp *s_in, struct rt_msghdr *rtm);
Index: freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/rpc.lockd/kern.c	2012-12-29 19:56:58.0 +
+++ freebsd-utils-9.0+ds1/usr.sbin/rpc.lockd/kern.c	2012-12-29 20:00:14.848822213 +
@@ -52,6 +52,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
Index: freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c
===
--- freebsd-utils-9.0+ds1.orig/usr.sbin/pppctl/pppctl.c	2004-12-13 14:50:13.0 +
+++ freebsd-utils-9.0+ds1/usr.sbin/pppctl/pppctl.c	2012-12-29 20:00:17.754640690 +
@@ -48,6 +48,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #define LINELEN 2048
 
Index: freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c
===
--- freebsd-utils-9.0+ds1.orig/usr.bin/kdump/kdump.c	2012-12-29 19:56:58.0 +
+++ freebsd-utils-9.0+ds1/usr.bin/kdump/kdump.c	2012-12-29 20:05:19.540626059 +
@@ -83,6 +83,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include "ktrace.h"
 #include "kdump_subr.h"
 
Index: freebsd-utils-9.0+ds1/sbin/geom/core/geom.c
===
--- freebsd-utils-9.0+ds1.orig/sbin/geom/core/geom.c	2011-03-24 19:11:05.0 +
+++ freebsd-utils-9.0+ds1/sbin/geom/core/geom.c	2012-12-29 20:06:16.428605677 +
@@ -46,6 +46,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 
Index: freebsd-utils-9.0+ds1/sbin/geom/class/eli/geom_eli.c
===
--- freebsd-utils-9.0+ds1.orig/sbin/geom/class/eli/geom_eli.c	2010-11-22 20:10:48.0 +
+++ freebsd-utils-9.0+ds1/sbin/geom/class/eli/geom_eli.c	2012-12-29 20:00:30.210625738 +
@@ -43,6 +43,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
Index: freebsd-utils-9.0+ds1/sbin/geom/class/stripe/geom_stripe.c
===
--- freebsd-utils-9.0+ds1.orig/sbin/geom/class/stripe/geom_stripe.c	2010-10-09 21:20:27.0 +0100
+++ freebsd-utils-9.0+ds1/sbin/geom/class/stripe/geom_stripe.c	2012-12-29 20:02:33.016673155 +
@@ -36,6 +36,8 @@
 #incl

Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Steven Chamberlain
Hi,

I agree that libbsd and freebsd-glue seem to conflict with each other,
but neither one of them by itself has everything needed for freebsd-libs.

So Jeff's patch is the least intrusive way to fix this, and that's what
we have to go with at this late stage.  It fixes a bug we're seeing now
and is unlikely to introduce more...

I can provide a similar patch for freebsd-utils which has the same
issues, but the only problem I could confirm yet was a segfault in
ifconfig bridge configuration (#696514) due to it.


I propose adding the -Werror part of the patch into Wheezy as well.  If
it does trigger a FTBFS, it's because we missed something, or something
wrong with the build environment that we need to know about.  We might
need to drop it someday for a new upstream release but hopefully not.

Regards,
-- 
Steven Chamberlain
ste...@pyro.eu.org


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Guillem Jover
On Fri, 2012-12-28 at 19:44:41 -0800, Christoph Egger wrote:
>   I see there's a patch in this bug report. Do you think this is a
> solution for wheezy? If so I'd volunteer to upload a new version of
> freebsd-libs

I've checked now the interaction of the libbsd-overlay and freebsd-glue,
and they do not play well. Consequently that would require way more
changes than the proposed patch, so even if I've not tested it, it would
seem to be the better solution for now given the freeze. Moving the
-Werror line one up would reduce the diff by 1, but that's pretty much
insignificant, so regardless of that:

Acked-by: Guillem Jover 

I'll add missing stuff to libbsd, and for jessie I'll make freebsd-glue
play well with the overlay, once that's fixed the other packages can
be switched back to use the overlay.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-29 Thread Jeff Epler
If it's a question of minimal impact to fix the specific crash that
grub-probe encounters, then there are two more minimal ways to fix this
specific problem that come to mind:

replace reallocf with realloc---but in the unlikely case that realloc
fails, it doesn't deallocate the argument (this is the point of
reallocf)

explicitly declare reallocf instead of using the  header:
void *reallocf(void *, size_t)

however, I don't think either of these is better than the approach I
originally proposed, to add a #include directive that matches the one in
the reallocf manpage that debian ships.

(dropping the -Werror= flag addition would of course make it a bit more
minimal; it might avoid an FTBFS in the future, but if it's an FTBFS
that would point right at another crashing bug, well, it might be a
bonus rather than a detriment to FTBFS)

Being unfamiliar with the culture and practices of Debian, I can't speak
to whether a more invasive ('overlay') approach is appropriate or not in
light of the present freeze, but it seems that Guillem Jover has
concerns about doing that at this moment.

The machine where I originally encountered the trouble isn't yet in
production, so if there's an alternate fix proposed soon I'll be happy
to test it out.  On the other hand, I think the presence or absence of
the implicit declaration warning is enough to indicate whether the bug
is present under any given fix...

Jeff


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#685625: libgeom: may cause segfault of grub-probe

2012-12-28 Thread Christoph Egger
Hi!

  I see there's a patch in this bug report. Do you think this is a
solution for wheezy? If so I'd volunteer to upload a new version of
freebsd-libs

Regards

Christoph


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org