Gentoo Archives: gentoo-hardened

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

Replies

Subject Author
Re: [gentoo-hardened] hardened-sources-2.6.36-r8 "Tóth Attila" <atoth@××××××××××.hu>
Re: [gentoo-hardened] hardened-sources-2.6.36-r8 Matthew Thode <mthode@××××××.org>
Re: [gentoo-hardened] hardened-sources-2.6.36-r8 pageexec@××××××××.hu