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