First published: Wed Apr 03 2024(Updated: )
In the Linux kernel, the following vulnerability has been resolved: arp: Prevent overflow in arp_req_get(). syzkaller reported an overflown write in arp_req_get(). [0] When ioctl(SIOCGARP) is issued, arp_req_get() looks up an neighbour entry and copies neigh->ha to struct arpreq.arp_ha.sa_data. The arp_ha here is struct sockaddr, not struct sockaddr_storage, so the sa_data buffer is just 14 bytes. In the splat below, 2 bytes are overflown to the next int field, arp_flags. We initialise the field just after the memcpy(), so it's not a problem. However, when dev->addr_len is greater than 22 (e.g. MAX_ADDR_LEN), arp_netmask is overwritten, which could be set as htonl(0xFFFFFFFFUL) in arp_ioctl() before calling arp_req_get(). To avoid the overflow, let's limit the max length of memcpy(). Note that commit b5f0de6df6dc ("net: dev: Convert sa_data to flexible array in struct sockaddr") just silenced syzkaller. [0]: memcpy: detected field-spanning write (size 16) of single field "r->arp_ha.sa_data" at net/ipv4/arp.c:1128 (size 14) WARNING: CPU: 0 PID: 144638 at net/ipv4/arp.c:1128 arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128 Modules linked in: CPU: 0 PID: 144638 Comm: syz-executor.4 Not tainted 6.1.74 #31 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-5 04/01/2014 RIP: 0010:arp_req_get+0x411/0x4a0 net/ipv4/arp.c:1128 Code: fd ff ff e8 41 42 de fb b9 0e 00 00 00 4c 89 fe 48 c7 c2 20 6d ab 87 48 c7 c7 80 6d ab 87 c6 05 25 af 72 04 01 e8 5f 8d ad fb <0f> 0b e9 6c fd ff ff e8 13 42 de fb be 03 00 00 00 4c 89 e7 e8 a6 RSP: 0018:ffffc900050b7998 EFLAGS: 00010286 RAX: 0000000000000000 RBX: ffff88803a815000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: ffffffff8641a44a RDI: 0000000000000001 RBP: ffffc900050b7a98 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 203a7970636d656d R12: ffff888039c54000 R13: 1ffff92000a16f37 R14: ffff88803a815084 R15: 0000000000000010 FS: 00007f172bf306c0(0000) GS:ffff88805aa00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f172b3569f0 CR3: 0000000057f12005 CR4: 0000000000770ef0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 PKRU: 55555554 Call Trace: <TASK> arp_ioctl+0x33f/0x4b0 net/ipv4/arp.c:1261 inet_ioctl+0x314/0x3a0 net/ipv4/af_inet.c:981 sock_do_ioctl+0xdf/0x260 net/socket.c:1204 sock_ioctl+0x3ef/0x650 net/socket.c:1321 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x18e/0x220 fs/ioctl.c:856 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x64/0xce RIP: 0033:0x7f172b262b8d Code: 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 f3 0f 1e fa 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 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f172bf300b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f172b3abf80 RCX: 00007f172b262b8d RDX: 0000000020000000 RSI: 0000000000008954 RDI: 0000000000000003 RBP: 00007f172b2d3493 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f172b3abf80 R15: 00007f172bf10000 </TASK>
Credit: 416baaa9-dc9f-4396-8d5f-8c081fb06d67 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Software | Affected Version | How to fix |
---|---|---|
redhat/kernel | <5.10.211 | 5.10.211 |
redhat/kernel | <5.15.150 | 5.15.150 |
redhat/kernel | <6.1.80 | 6.1.80 |
redhat/kernel | <6.6.19 | 6.6.19 |
redhat/kernel | <6.7.7 | 6.7.7 |
redhat/kernel | <6.8 | 6.8 |
debian/linux | 5.10.218-1 5.10.221-1 6.1.94-1 6.1.99-1 6.9.10-1 6.9.12-1 | |
ubuntu/linux | <5.4.0-186.206 | 5.4.0-186.206 |
ubuntu/linux | <5.15.0-112.122 | 5.15.0-112.122 |
ubuntu/linux | <6.5.0-44.44 | 6.5.0-44.44 |
ubuntu/linux | <6.8~ | 6.8~ |
ubuntu/linux-aws | <5.4.0-1126.136 | 5.4.0-1126.136 |
ubuntu/linux-aws | <5.15.0-1063.69 | 5.15.0-1063.69 |
ubuntu/linux-aws | <6.8~ | 6.8~ |
ubuntu/linux-aws-5.15 | <5.15.0-1063.69~20.04.1 | 5.15.0-1063.69~20.04.1 |
ubuntu/linux-aws-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-aws-5.4 | <5.4.0-1126.136~18.04.1 | 5.4.0-1126.136~18.04.1 |
ubuntu/linux-aws-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-aws-6.5 | <6.5.0-1023.23~22.04.1 | 6.5.0-1023.23~22.04.1 |
ubuntu/linux-aws-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-aws-fips | <6.8~ | 6.8~ |
ubuntu/linux-aws-hwe | <6.8~ | 6.8~ |
ubuntu/linux-azure | <5.4.0-1131.138 | 5.4.0-1131.138 |
ubuntu/linux-azure | <5.15.0-1066.75 | 5.15.0-1066.75 |
ubuntu/linux-azure | <6.8~ | 6.8~ |
ubuntu/linux-azure-4.15 | <6.8~ | 6.8~ |
ubuntu/linux-azure-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-azure-5.4 | <5.4.0-1131.138~18.04.1 | 5.4.0-1131.138~18.04.1 |
ubuntu/linux-azure-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-azure-6.5 | <6.5.0-1024.25~22.04.1 | 6.5.0-1024.25~22.04.1 |
ubuntu/linux-azure-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-azure-fde | <5.15.0-1067.76.1 | 5.15.0-1067.76.1 |
ubuntu/linux-azure-fde | <6.8~ | 6.8~ |
ubuntu/linux-azure-fde-5.15 | <5.15.0-1065.74~20.04.1.1 | 5.15.0-1065.74~20.04.1.1 |
ubuntu/linux-azure-fde-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-azure-fips | <6.8~ | 6.8~ |
ubuntu/linux-bluefield | <5.4.0-1086.93 | 5.4.0-1086.93 |
ubuntu/linux-bluefield | <6.8~ | 6.8~ |
ubuntu/linux-fips | <6.8~ | 6.8~ |
ubuntu/linux-gcp | <5.4.0-1130.139 | 5.4.0-1130.139 |
ubuntu/linux-gcp | <5.15.0-1062.70 | 5.15.0-1062.70 |
ubuntu/linux-gcp | <6.5.0-1024.26 | 6.5.0-1024.26 |
ubuntu/linux-gcp | <6.8~ | 6.8~ |
ubuntu/linux-gcp-4.15 | <6.8~ | 6.8~ |
ubuntu/linux-gcp-5.15 | <5.15.0-1062.70~20.04.1 | 5.15.0-1062.70~20.04.1 |
ubuntu/linux-gcp-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-gcp-5.4 | <5.4.0-1130.139~18.04.1 | 5.4.0-1130.139~18.04.1 |
ubuntu/linux-gcp-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-gcp-6.5 | <6.5.0-1024.26~22.04.1 | 6.5.0-1024.26~22.04.1 |
ubuntu/linux-gcp-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-gcp-fips | <6.8~ | 6.8~ |
ubuntu/linux-gke | <5.15.0-1060.66 | 5.15.0-1060.66 |
ubuntu/linux-gke | <6.8~ | 6.8~ |
ubuntu/linux-gkeop | <5.4.0-1093.97 | 5.4.0-1093.97 |
ubuntu/linux-gkeop | <5.15.0-1046.53 | 5.15.0-1046.53 |
ubuntu/linux-gkeop | <6.8~ | 6.8~ |
ubuntu/linux-gkeop-5.15 | <5.15.0-1046.53~20.04.1 | 5.15.0-1046.53~20.04.1 |
ubuntu/linux-gkeop-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-hwe | <6.8~ | 6.8~ |
ubuntu/linux-hwe-5.15 | <5.15.0-113.123~20.04.1 | 5.15.0-113.123~20.04.1 |
ubuntu/linux-hwe-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-hwe-5.4 | <5.4.0-186.206~18.04.1 | 5.4.0-186.206~18.04.1 |
ubuntu/linux-hwe-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-hwe-6.5 | <6.5.0-44.44~22.04.1 | 6.5.0-44.44~22.04.1 |
ubuntu/linux-hwe-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-ibm | <5.4.0-1073.78 | 5.4.0-1073.78 |
ubuntu/linux-ibm | <5.15.0-1056.59 | 5.15.0-1056.59 |
ubuntu/linux-ibm | <6.8~ | 6.8~ |
ubuntu/linux-ibm-5.15 | <5.15.0-1057.60~20.04.1 | 5.15.0-1057.60~20.04.1 |
ubuntu/linux-ibm-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-ibm-5.4 | <5.4.0-1073.78~18.04.1 | 5.4.0-1073.78~18.04.1 |
ubuntu/linux-ibm-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-intel | <6.8~ | 6.8~ |
ubuntu/linux-intel-iotg | <5.15.0-1058.64 | 5.15.0-1058.64 |
ubuntu/linux-intel-iotg | <6.8~ | 6.8~ |
ubuntu/linux-intel-iotg-5.15 | <5.15.0-1058.64~20.04.1 | 5.15.0-1058.64~20.04.1 |
ubuntu/linux-intel-iotg-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-iot | <5.4.0-1038.39 | 5.4.0-1038.39 |
ubuntu/linux-iot | <6.8~ | 6.8~ |
ubuntu/linux-kvm | <5.4.0-1114.121 | 5.4.0-1114.121 |
ubuntu/linux-kvm | <5.15.0-1060.65 | 5.15.0-1060.65 |
ubuntu/linux-kvm | <6.8~ | 6.8~ |
ubuntu/linux-laptop | <6.8~ | 6.8~ |
ubuntu/linux-lowlatency | <5.15.0-110.120 | 5.15.0-110.120 |
ubuntu/linux-lowlatency | <6.8~ | 6.8~ |
ubuntu/linux-lowlatency-hwe-5.15 | <5.15.0-110.120~20.04.1 | 5.15.0-110.120~20.04.1 |
ubuntu/linux-lowlatency-hwe-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-lowlatency-hwe-6.5 | <6.5.0-44.44.1~22.04.1 | 6.5.0-44.44.1~22.04.1 |
ubuntu/linux-lowlatency-hwe-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-lts-xenial | <6.8~ | 6.8~ |
ubuntu/linux-nvidia | <5.15.0-1058.59 | 5.15.0-1058.59 |
ubuntu/linux-nvidia | <6.8~ | 6.8~ |
ubuntu/linux-nvidia-6.5 | <6.5.0-1023.24 | 6.5.0-1023.24 |
ubuntu/linux-nvidia-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-nvidia-6.8 | <6.8~ | 6.8~ |
ubuntu/linux-nvidia-lowlatency | <6.8~ | 6.8~ |
ubuntu/linux-oem-6.5 | <6.5.0-1027.28 | 6.5.0-1027.28 |
ubuntu/linux-oem-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-oem-6.8 | <6.8~ | 6.8~ |
ubuntu/linux-oracle | <5.4.0-1125.134 | 5.4.0-1125.134 |
ubuntu/linux-oracle | <5.15.0-1061.67 | 5.15.0-1061.67 |
ubuntu/linux-oracle | <6.8~ | 6.8~ |
ubuntu/linux-oracle-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-oracle-5.4 | <5.4.0-1125.134~18.04.1 | 5.4.0-1125.134~18.04.1 |
ubuntu/linux-oracle-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-oracle-6.5 | <6.5.0-1026.26~22.04.1 | 6.5.0-1026.26~22.04.1 |
ubuntu/linux-oracle-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-raspi | <5.4.0-1110.122 | 5.4.0-1110.122 |
ubuntu/linux-raspi | <5.15.0-1058.61 | 5.15.0-1058.61 |
ubuntu/linux-raspi | <6.5.0-1020.23 | 6.5.0-1020.23 |
ubuntu/linux-raspi | <6.8~ | 6.8~ |
ubuntu/linux-raspi-5.4 | <5.4.0-1110.122~18.04.1 | 5.4.0-1110.122~18.04.1 |
ubuntu/linux-raspi-5.4 | <6.8~ | 6.8~ |
ubuntu/linux-riscv | <6.8~ | 6.8~ |
ubuntu/linux-riscv-5.15 | <5.15.0-1059.63~20.04.1 | 5.15.0-1059.63~20.04.1 |
ubuntu/linux-riscv-5.15 | <6.8~ | 6.8~ |
ubuntu/linux-riscv-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-starfive | <6.8~ | 6.8~ |
ubuntu/linux-starfive-6.5 | <6.5.0-1017.18~22.04.1 | 6.5.0-1017.18~22.04.1 |
ubuntu/linux-starfive-6.5 | <6.8~ | 6.8~ |
ubuntu/linux-xilinx-zynqmp | <5.4.0-1045.49 | 5.4.0-1045.49 |
ubuntu/linux-xilinx-zynqmp | <5.15.0-1030.34 | 5.15.0-1030.34 |
ubuntu/linux-xilinx-zynqmp | <6.8~ | 6.8~ |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
(Appears in the following advisories)