android_kernel_motorola_sm6225/include
Patrick McHardy 55820ee2f8 [NET]: Fix signedness issues in net/core/filter.c
This is the code to load packet data into a register:

                        k = fentry->k;
                        if (k < 0) {
...
                        } else {
                                u32 _tmp, *p;
                                p = skb_header_pointer(skb, k, 4, &_tmp);
                                if (p != NULL) {
                                        A = ntohl(*p);
                                        continue;
                                }
                        }

skb_header_pointer checks if the requested data is within the
linear area:

        int hlen = skb_headlen(skb);

        if (offset + len <= hlen)
                return skb->data + offset;

When offset is within [INT_MAX-len+1..INT_MAX] the addition will
result in a negative number which is <= hlen.

I couldn't trigger a crash on my AMD64 with 2GB of memory, but a
coworker tried on his x86 machine and it crashed immediately.

This patch fixes the check in skb_header_pointer to handle large
positive offsets similar to skb_copy_bits. Invalid data can still
be accessed using negative offsets (also similar to skb_copy_bits),
anyone using negative offsets needs to verify them himself.

Thanks to Thomas Vögtle <thomas.voegtle@coreworks.de> for verifying the
problem by crashing his machine and providing me with an Oops.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-05 14:08:10 -07:00
..
acpi [PATCH] acpi bridge hotadd: Export the interface to get PCI id for an ACPI handle 2005-06-27 21:52:42 -07:00
asm-alpha [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-arm [PATCH] ARM: Fix new-ABI layout of struct stat64 2005-07-04 13:02:46 +01:00
asm-arm26 [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-cris [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-frv [PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n 2005-06-27 21:52:46 -07:00
asm-generic [PATCH] kexec: vmlinux: fix physical addresses 2005-06-25 16:24:47 -07:00
asm-h8300 [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-i386 [PATCH] x86: i8253/i8259A lock cleanup 2005-06-30 08:45:10 -07:00
asm-ia64 Auto merge with /home/aegl/GIT/linus 2005-06-29 15:21:41 -07:00
asm-m32r [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-m68k [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-m68knommu [PATCH] streamline preempt_count type across archs 2005-06-23 09:45:19 -07:00
asm-mips [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-parisc [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-ppc [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-ppc64 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-06-30 08:48:56 -07:00
asm-s390 [PATCH] s390: fix finish_arch_switch 2005-06-30 08:45:08 -07:00
asm-sh [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-sh64 [PATCH] Serial: Split 8250 port table (part 2) 2005-06-29 18:45:19 +01:00
asm-sparc [PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n 2005-06-27 21:52:46 -07:00
asm-sparc64 Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2005-06-27 22:07:56 -07:00
asm-um [PATCH] uml: add profile_pc for i386 2005-06-25 16:24:36 -07:00
asm-v850 [PATCH] PCI: fix up errors after dma bursting patch and CONFIG_PCI=n 2005-06-27 21:52:46 -07:00
asm-x86_64 [PATCH] x86: i8253/i8259A lock cleanup 2005-06-30 08:45:10 -07:00
asm-xtensa [PATCH] xtensa: Fix asm macro 2005-06-30 08:45:11 -07:00
linux [NET]: Fix signedness issues in net/core/filter.c 2005-07-05 14:08:10 -07:00
math-emu Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
media [PATCH] v4l: tuner improvements 2005-06-28 21:20:36 -07:00
mtd Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
net [PATCH] ieee80211.h build fix 2005-06-28 22:45:32 -07:00
pcmcia [PATCH] pcmcia: ds.c cleanup 2005-06-27 18:03:20 -07:00
rxrpc Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
scsi [PATCH] I2O: Adaptec specific SG_IO access, firmware access through sysfs and 2400A workaround 2005-06-24 00:05:28 -07:00
sound [PATCH] create a kstrdup library function 2005-06-23 09:45:18 -07:00
video [PATCH] Clean-up and bug fix for tdfxfb framebuffer size detection 2005-05-01 08:59:25 -07:00