New: NULL pointer dereference in ip_fragment
Subsystems (4)
https://bugzilla.kernel.org/show_bug.cgi?id=33842
I believe Eric's recent change to br_parse_ip_options() didn't make it to 2.6.39-rc4:
bridge: reset IPCB in br_parse_ip_options
commit f8e9881c2aef1e982e5abc25c046820cd0b7cf64
net/bridge/br_netfilter.c +2 -4
@@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb) goto drop; } -/* Zero out the CB buffer if no options present */ -if (iph->ihl ==5 ) { -memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +if (iph->ihl ==5 )return 0 ; - } opt->optlen = iph->ihl*4 -sizeof (struct iphdr );if (ip_options_compile (dev_net (dev), opt, skb))
Tomas, could you please try a kernel that has the above mentioned change and see if the crash re-occurs ?
Thanks,
Bandan
David Miller
maintainerFrom: Bandan Das <[email protected]>
Date: Tue, 26 Apr 2011 16:31:54 -0400
Quoted 29 lines
https://bugzilla.kernel.org/show_bug.cgi?id=33842
I believe Eric's recent change to
br_parse_ip_options()didn't make it to 2.6.39-rc4:bridge: reset IPCB in
br_parse_ip_options
commitf8e9881c2aef1e982e5abc25c046820cd0b7cf64net/bridge/br_netfilter.c +2
-4@@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb) goto drop; } -/* Zero out the CB buffer if no options present */ -if (iph->ihl ==5 ) { -memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +if (iph->ihl ==5 )return 0 ; - } opt->optlen = iph->ihl*4 -sizeof (struct iphdr );if (ip_options_compile (dev_net (dev), opt, skb))
Quoted 2 lines
Tomas, could you please try a kernel that has the above mentioned change and see if the crash re-occurs ?
This patch is mangled by your email client, tab characters have been turned into spaces, so it won't be usable by anyone.
Quoted 2 lines · David Miller
This patch is mangled by your email client, tab characters have been turned into spaces, so it won't be usable by anyone.
Thats strange, I thought it was already in linux-2.6 anyway ?
Quoted 7 lines · Eric Dumazet
Quoted 2 lines · David Miller
This patch is mangled by your email client, tab characters have been turned into spaces, so it won't be usable by anyone.
Thats strange, I thought it was already in linux-2.6 anyway ?
Umm.. I could be wrong! I just did a quick grep for your name in the 2.6.39-rc4 changelog :
http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.39-rc4
and didn't find it there.
--
Bandan
Quoted 6 lines · Bandan Das
Quoted 5 lines · Eric Dumazet
Quoted 2 lines · David Miller
This patch is mangled by your email client, tab characters have been turned into spaces, so it won't be usable by anyone.
Quoted 7 lines
Quoted 2 lines
Thats strange, I thought it was already in linux-2.6 anyway ?
Umm.. I could be wrong! I just did a quick grep for your name in the 2.6.39-rc4 changelog :
http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.39-rc4and didn't find it there.
Then it will be in rc5, dont worry ;)
Quoted 9 lines
Quoted 5 lines
Umm.. I could be wrong! I just did a quick grep for your name in the 2.6.39-rc4 changelog :
http://www.kernel.org/pub/linux/kernel/v2.6/testing/ChangeLog-2.6.39-rc4and didn't find it there.
Then it will be in rc5, dont worry ;)
Yeah, I just rechecked and this is already in Linus' tree. So, Tomas you can either try pulling in those changes or you can apply this patch and see if it makes any difference. Thanks!
net/bridge/br_netfilter.c +2 -4
@@ -249,11 +249,9 @@ static int br_parse_ip_options(struct sk_buff *skb) goto drop; } -/* Zero out the CB buffer if no options present */ -if (iph->ihl ==5 ) { -memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm )); +if (iph->ihl ==5 )return 0 ; - } opt->optlen = iph->ihl*4 -sizeof (struct iphdr );if (ip_options_compile (dev_net (dev), opt, skb))
Quoted 4 lines · Bandan Das
Quoted 1 line
Yeah, I just rechecked and this is already in Linus' tree. So, Tomas you can either try pulling in those changes or you can apply this patch and see if it makes any difference. Thanks!
Better pull Linus tree because there is another patch involved.
(commits c65353daf137dd41f3ede3baf62d561fca076228
ip: ip_options_compile() resilient to NULL skb route)
Quoted 8 lines · Eric Dumazet
Quoted 3 lines · Bandan Das
Yeah, I just rechecked and this is already in Linus' tree. So, Tomas you can either try pulling in those changes or you can apply this patch and see if it makes any difference. Thanks!
Better pull Linus tree because there is another patch involved.
(commits
c65353daf137dd41f3ede3baf62d561fca076228
ip:ip_options_compile()resilient to NULL skb route
Still getting that error (on rc4-00245-g4175242, which includes that commit).
Quoted 5 lines · Tomas Carnecky
Quoted 4 lines · Eric Dumazet
Quoted 3 lines · Bandan Das
Yeah, I just rechecked and this is already in Linus' tree. So, Tomas you can either try pulling in those changes or you can apply this patch and see if it makes any difference. Thanks!
Quoted 8 lines
Quoted 4 lines
Better pull Linus tree because there is another patch involved.
(commits
c65353daf137dd41f3ede3baf62d561fca076228
ip:ip_options_compile()resilient to NULL skb routeStill getting that error (on rc4-00245-g4175242, which includes that commit).
Could you send us a complete trace ?
One way to get one is to use netconsole (provided you have another machine )
grep NETCONSOLE .configCONFIG_NETCONSOLE=y
Add on your boot command
[email protected]/eth0,[email protected]/00:1e:0b:ec:c3:e4
messages sent to host 192.168.20.112 udp port 4444, mac addr 00:1e:0b:ec:c3:e4, on eth0
then on 192.168.20.112 start a netcat listening on udp port 4444 to get a copy of messages.
netcat -l -u -p 4444
Complete doc on Documentation/networking/netconsole.txt
Thanks !
Quoted 1 line · Eric Dumazet
[email protected]/eth0,[email protected]/00:1e:0b:ec:c3:e4
I'm not having any luck with the netconsole. The last message I see on the target host is "Freeing unused kernel memory: 100k freed". I don't see any messages after that. Do I need to configure the same IP address in netconsole as is later configured by userspace? I set netconsole to use 192.168.0.50 while the init scripts set br0 to have 192.168.0.82. And would netconsole even work, as the bug is in the networking code itself?
Quoted 10 lines · Tomas Carnecky
Quoted 1 line · Eric Dumazet
[email protected]/eth0,[email protected]/00:1e:0b:ec:c3:e4
I'm not having any luck with the netconsole. The last message I see on the target host is "Freeing unused kernel memory: 100k freed". I don't see any messages after that. Do I need to configure the same IP address in netconsole as is later configured by userspace? I set netconsole to use 192.168.0.50 while the init scripts set br0 to have 192.168.0.82. And would netconsole even work, as the bug is in the networking code itself?
It should work yes, even for a bug in networking stack.
Yes, you should take the source address you're supposed to have once machine running. I suspect it could work with another IP address, but using the normal one makes sure you dont hit some anti spoofing rule in your LAN.
To check if netconsole works (after boot), you can try
dmesg -n 8
modprobe pktgen
You should see on remote machine :
pktgen: Packet Generator for packet performance testing. Version: 2.74