Gentoo Archives: gentoo-hardened

From: Matthew Thode <mthode@××××××.org>
To: gentoo-hardened@l.g.o
Subject: Re: [gentoo-hardened] hardened-sources-2.6.36-r8
Date: Thu, 13 Jan 2011 21:05:33
Message-Id: AANLkTik-sVgzVJht4uqUs8nS1VNze3pS67OCoHQZMrp-@mail.gmail.com
In Reply to: [gentoo-hardened] hardened-sources-2.6.36-r8 by "Tóth Attila"
1 I had this issue with vanilla 2.6.32.27 patched with the 2.6.32.27 grsec
2 patch (2-3 days ago).
3
4 On Thu, Jan 13, 2011 at 14:38, "Tóth Attila" <atoth@××××××××××.hu> wrote:
5
6 > Compiling the recent hardened-sources results in the following error
7 > message, when irda is enabled:
8 >
9 > CC net/irda/af_irda.o
10 > net/irda/af_irda.c: In function ‘__irda_getsockopt’:
11 > net/irda/af_irda.c:2289:4: error: label ‘out’ used but not defined
12 >
13 > The changes causing it introduced recently.
14 >
15 > --- linux-2.6.36-hardened-r7/net/irda/af_irda.c 2010-10-20
16 > 22:30:22.000000000 +0200
17 > +++ linux-2.6.36-hardened-r8/net/irda/af_irda.c 2011-01-13
18 > 13:08:57.000000000 +0100
19 > @@ -2278,6 +2278,17 @@
20 >
21 > switch (optname) {
22 > case IRLMP_ENUMDEVICES:
23 > +
24 > +
25 > + /* Offset to first device entry */
26 > + offset = sizeof(struct irda_device_list) -
27 > + sizeof(struct irda_device_info);
28 > +
29 > + if (len < offset) {
30 > + err = -EINVAL;
31 > + goto out;
32 > + }
33 > +
34 > /* Ask lmp for the current discovery log */
35 > discoveries = irlmp_get_discoveries(&list.len,
36 > self->mask.word,
37 > self->nslots);
38 > @@ -2287,15 +2298,9 @@
39 > err = 0;
40 >
41 > /* Write total list length back to client */
42 > - if (copy_to_user(optval, &list,
43 > - sizeof(struct irda_device_list) -
44 > - sizeof(struct irda_device_info)))
45 > + if (copy_to_user(optval, &list, offset))
46 > err = -EFAULT;
47 >
48 > - /* Offset to first device entry */
49 > - offset = sizeof(struct irda_device_list) -
50 > - sizeof(struct irda_device_info);
51 > -
52 > /* Copy the list itself - watch for overflow */
53 > if(list.len > 2048)
54 > {
55 >
56 > What are your suggestions?
57 >
58 > Thx:
59 > Dw.
60 > --
61 > dr Tóth Attila, Radiológus, 06-20-825-8057
62 > Attila Toth MD, Radiologist, +36-20-825-8057
63 >
64 >
65 >

Replies

Subject Author
Re: [gentoo-hardened] hardened-sources-2.6.36-r8 Matthew Thode <mthode@××××××.org>