Bug 118771
Summary: | hv_netvsc panics when given a shared skbuff with < needed_headroom headroom and | ||
---|---|---|---|
Product: | Drivers | Reporter: | Robert Collins (robertc) |
Component: | Network | Assignee: | drivers_network (drivers_network) |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | stephen |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 4.4.0 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Robert Collins
2016-05-23 20:03:05 UTC
Reproduction instructions. git clone https://github.com/luigirizzo/netmap.git git reset --hard 8123c744470aa4562635dd139d3895ed68d45dd7 cd LINUX ./configure --no-drivers make sudo insmod netmap.ko cd ../examples make sudo ./pkt-gen -i eth0 -f tx -d 192.168.1.2:80 -s 192.168.137.75:1023 -n 5000 -S 00:15:5d:ba:c3:01 -D 00:15:5d:ba:c3:00 This should trigger the failure. The underlying kernel calls to do the same manually would be something like: /* Note, there is no headroom allocated */ skb = alloc_skb(1800, GFP_ATOMIC); skb->dev = dev; skb_copy_to_linear_data(skb, somedata, 1800); atomic_inc(&skb->users); dev_queue_xmit(skb); Note that the patched driver in master still calls skb_cow_head to ask for enough headroom - and when there is no headroom this will call pskb_reserve_head, which with users != 1 will barf. Bug is invalid. Kernel bugzilla is only for upstream kernel bugs WITH NO OUT OF TREE drivers. I'm confused: is it invalid because I triggered the panic using netmap? If so fair enough, but is there not an actual bug here in the hyperv driver which *is* in-tree? As far as I can tell it is legimitate (if illadvised) to submit an skb with 2 users linear data and insufficient headroom for the hyperv bus, and that is what will panic, not the netmap code. Unless you can reproduce with no out of tree drivers, it is invalid. That confuses me because I would have thought that latent bugs were still bugs even if the current code doesn't actually provoke it. In this case a driver panicing the kernel if dev->needed_headroom is not provided - because it is documented as being not guaranteed. However its your policy not mine, so I'll leave this alone at this point. |