Bug 1224642 (CVE-2024-35941) - VUL-0: REJECTED: CVE-2024-35941: kernel: net: skbuff: add overflow debug check to pull/push helpers
Summary: VUL-0: REJECTED: CVE-2024-35941: kernel: net: skbuff: add overflow debug chec...
Status: RESOLVED INVALID
Alias: CVE-2024-35941
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Security Team bot
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/406631/
Whiteboard: CVSSv3.1:SUSE:CVE-2024-35941:0.0:(AV:...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 16:03 UTC by SMASH SMASH
Modified: 2024-06-07 08:34 UTC (History)
5 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SMASH SMASH 2024-05-20 16:03:45 UTC
In the Linux kernel, the following vulnerability has been resolved:

net: skbuff: add overflow debug check to pull/push helpers

syzbot managed to trigger following splat:
BUG: KASAN: use-after-free in __skb_flow_dissect+0x4a3b/0x5e50
Read of size 1 at addr ffff888208a4000e by task a.out/2313
[..]
  __skb_flow_dissect+0x4a3b/0x5e50
  __skb_get_hash+0xb4/0x400
  ip_tunnel_xmit+0x77e/0x26f0
  ipip_tunnel_xmit+0x298/0x410
  ..

Analysis shows that the skb has a valid ->head, but bogus ->data
pointer.

skb->data gets its bogus value via the neigh layer, which does:

1556    __skb_pull(skb, skb_network_offset(skb));

... and the skb was already dodgy at this point:

skb_network_offset(skb) returns a negative value due to an
earlier overflow of skb->network_header (u16).  __skb_pull thus
"adjusts" skb->data by a huge offset, pointing outside skb->head
area.

Allow debug builds to splat when we try to pull/push more than
INT_MAX bytes.

After this, the syzkaller reproducer yields a more precise splat
before the flow dissector attempts to read off skb->data memory:

WARNING: CPU: 5 PID: 2313 at include/linux/skbuff.h:2653 neigh_connected_output+0x28e/0x400
  ip_finish_output2+0xb25/0xed0
  iptunnel_xmit+0x4ff/0x870
  ipgre_xmit+0x78e/0xbb0

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2024-35941
https://www.cve.org/CVERecord?id=CVE-2024-35941
https://git.kernel.org/stable/c/1b2b26595bb09febf14c5444c873ac4ec90a5a77
https://git.kernel.org/stable/c/219eee9c0d16f1b754a8b85275854ab17df0850a
https://git.kernel.org/stable/c/8af60bb2b215f478b886f1d6d302fefa7f0b917d
https://git.kernel.org/stable/c/fff05b2b004d9a8a2416d08647f3dc9068e357c8
https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2024/CVE-2024-35941.mbox
Comment 4 Michal Hocko 2024-06-04 10:58:13 UTC
This is not a security fix. This is a debugging patch to trigger a warning (something that is considered a CVE worth kinda problem by the kernel CVE team) when unusual/unexpected data is processed. CONFIG_DEBUG_NET is not enabled in SLE15-SP6 and older kernels doesn't have this as this has been introduced by d268c1f5cfc9 ("net: add CONFIG_DEBUG_NET") in 5.19.

Close as WONTFIX.
Comment 5 Michal Hocko 2024-06-04 11:01:49 UTC
I have sent a revoke request.
Comment 7 Robert Frohl 2024-06-04 15:16:12 UTC
closing, won't fix