Commit ddc748a
net: use skb_header_pointer() for TCPv4 GSO frag_off check
Syzbot reported a KMSAN uninit-value warning in gso_features_check()
called from netif_skb_features() [1].
gso_features_check() reads iph->frag_off to decide whether to clear
mangleid_features. Accessing the IPv4 header via ip_hdr()/inner_ip_hdr()
can rely on skb header offsets that are not always safe for direct
dereference on packets injected from PF_PACKET paths.
Use skb_header_pointer() for the TCPv4 frag_off check so the header read
is robust whether data is already linear or needs copying.
[1] https://syzkaller.appspot.com/bug?extid=1543a7d954d9c6d00407
Link: https://lore.kernel.org/netdev/[email protected]/
Fixes: cbc53e0 ("GSO: Add GSO type for fixed IPv4 ID")
Reported-by: [email protected]
Closes: https://syzkaller.appspot.com/bug?extid=1543a7d954d9c6d00407
Tested-by: [email protected]
Signed-off-by: Guoyu Su <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 514aac3 commit ddc748a
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3821 | 3821 | | |
3822 | 3822 | | |
3823 | 3823 | | |
3824 | | - | |
3825 | | - | |
| 3824 | + | |
| 3825 | + | |
| 3826 | + | |
| 3827 | + | |
| 3828 | + | |
3826 | 3829 | | |
3827 | | - | |
| 3830 | + | |
| 3831 | + | |
| 3832 | + | |
3828 | 3833 | | |
3829 | 3834 | | |
3830 | 3835 | | |
| |||
0 commit comments