CVE-2023-52435

Severity CVSS v4.0:
Pending analysis
Type:
CWE-119 Buffer Errors
Publication date:
20/02/2024
Last modified:
04/09/2024

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> net: prevent mss overflow in skb_segment()<br /> <br /> Once again syzbot is able to crash the kernel in skb_segment() [1]<br /> <br /> GSO_BY_FRAGS is a forbidden value, but unfortunately the following<br /> computation in skb_segment() can reach it quite easily :<br /> <br /> mss = mss * partial_segs;<br /> <br /> 65535 = 3 * 5 * 17 * 257, so many initial values of mss can lead to<br /> a bad final result.<br /> <br /> Make sure to limit segmentation so that the new mss value is smaller<br /> than GSO_BY_FRAGS.<br /> <br /> [1]<br /> <br /> general protection fault, probably for non-canonical address 0xdffffc000000000e: 0000 [#1] PREEMPT SMP KASAN<br /> KASAN: null-ptr-deref in range [0x0000000000000070-0x0000000000000077]<br /> CPU: 1 PID: 5079 Comm: syz-executor993 Not tainted 6.7.0-rc4-syzkaller-00141-g1ae4cd3cbdd0 #0<br /> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023<br /> RIP: 0010:skb_segment+0x181d/0x3f30 net/core/skbuff.c:4551<br /> Code: 83 e3 02 e9 fb ed ff ff e8 90 68 1c f9 48 8b 84 24 f8 00 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 b6 04 02 84 c0 74 08 3c 03 0f 8e 8a 21 00 00 48 8b 84 24 f8 00<br /> RSP: 0018:ffffc900043473d0 EFLAGS: 00010202<br /> RAX: dffffc0000000000 RBX: 0000000000010046 RCX: ffffffff886b1597<br /> RDX: 000000000000000e RSI: ffffffff886b2520 RDI: 0000000000000070<br /> RBP: ffffc90004347578 R08: 0000000000000005 R09: 000000000000ffff<br /> R10: 000000000000ffff R11: 0000000000000002 R12: ffff888063202ac0<br /> R13: 0000000000010000 R14: 000000000000ffff R15: 0000000000000046<br /> FS: 0000555556e7e380(0000) GS:ffff8880b9900000(0000) knlGS:0000000000000000<br /> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033<br /> CR2: 0000000020010000 CR3: 0000000027ee2000 CR4: 00000000003506f0<br /> DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000<br /> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400<br /> Call Trace:<br /> <br /> udp6_ufo_fragment+0xa0e/0xd00 net/ipv6/udp_offload.c:109<br /> ipv6_gso_segment+0x534/0x17e0 net/ipv6/ip6_offload.c:120<br /> skb_mac_gso_segment+0x290/0x610 net/core/gso.c:53<br /> __skb_gso_segment+0x339/0x710 net/core/gso.c:124<br /> skb_gso_segment include/net/gso.h:83 [inline]<br /> validate_xmit_skb+0x36c/0xeb0 net/core/dev.c:3626<br /> __dev_queue_xmit+0x6f3/0x3d60 net/core/dev.c:4338<br /> dev_queue_xmit include/linux/netdevice.h:3134 [inline]<br /> packet_xmit+0x257/0x380 net/packet/af_packet.c:276<br /> packet_snd net/packet/af_packet.c:3087 [inline]<br /> packet_sendmsg+0x24c6/0x5220 net/packet/af_packet.c:3119<br /> sock_sendmsg_nosec net/socket.c:730 [inline]<br /> __sock_sendmsg+0xd5/0x180 net/socket.c:745<br /> __sys_sendto+0x255/0x340 net/socket.c:2190<br /> __do_sys_sendto net/socket.c:2202 [inline]<br /> __se_sys_sendto net/socket.c:2198 [inline]<br /> __x64_sys_sendto+0xe0/0x1b0 net/socket.c:2198<br /> do_syscall_x64 arch/x86/entry/common.c:52 [inline]<br /> do_syscall_64+0x40/0x110 arch/x86/entry/common.c:83<br /> entry_SYSCALL_64_after_hwframe+0x63/0x6b<br /> RIP: 0033:0x7f8692032aa9<br /> Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 d1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48<br /> RSP: 002b:00007fff8d685418 EFLAGS: 00000246 ORIG_RAX: 000000000000002c<br /> RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f8692032aa9<br /> RDX: 0000000000010048 RSI: 00000000200000c0 RDI: 0000000000000003<br /> RBP: 00000000000f4240 R08: 0000000020000540 R09: 0000000000000014<br /> R10: 0000000000000000 R11: 0000000000000246 R12: 00007fff8d685480<br /> R13: 0000000000000001 R14: 00007fff8d685480 R15: 0000000000000003<br /> <br /> Modules linked in:<br /> ---[ end trace 0000000000000000 ]---<br /> RIP: 0010:skb_segment+0x181d/0x3f30 net/core/skbuff.c:4551<br /> Code: 83 e3 02 e9 fb ed ff ff e8 90 68 1c f9 48 8b 84 24 f8 00 00 00 48 8d 78 70 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 b6 04 02 84 c0 74 08 3c 03 0f 8e 8a 21 00 00 48 8b 84 24 f8 00<br /> RSP: 0018:ffffc900043473d0 EFLAGS: 00010202<br /> RAX: dffffc0000000000 RBX: 0000000000010046 RCX: ffffffff886b1597<br /> RDX: 000000000000000e RSI: ffffffff886b2520 RDI: 0000000000000070<br /> RBP: ffffc90004347578 R0<br /> ---truncated---

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.4.269 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.5.0 (including) 5.10.210 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11.0 (including) 5.15.149 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16.0 (including) 6.1.79 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2.0 (including) 6.6.11 (excluding)
cpe:2.3:o:linux:linux_kernel:6.7:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.7:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.7:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.7:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.7:rc5:*:*:*:*:*:*