CVE-2024-26596net: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events
In the Linux kernel, the following vulnerability has been resolved: net: dsa: fix netdev_priv() dereference before check on non-DSA netdevice events After the blamed commit, we started doing this dereference for every NETDEV_CHANGEUPPER and NETDEV_PRECHANGEUPPER event in the system. static inline struct dsa_port *dsa_user_to_port(const struct net_device *dev) { struct dsa_user_priv *p = netdev_priv(dev); return p->dp; } Which is obviously bogus, because not all net_devices have a netdev_priv() of type struct dsa_user_priv. But struct dsa_user_priv is fairly small, and p->dp means dereferencing 8 bytes starting with offset 16. Most drivers allocate that much private memory anyway, making our access not fault, and we discard the bogus data quickly afterwards, so this wasn't caught. But the dummy interface is somewhat special in that it calls alloc_netdev() with a priv size of 0. So every netdev_priv() dereference is invalid, and we get this when we emit a NETDEV_PRECHANGEUPPER event with a VLAN as its new upper: $ ip link add dummy1 type dummy $ ip link add link dummy1 name dummy1.100 type vlan id 100 [ 43.309174] ================================================================== [ 43.316456] BUG: KASAN: slab-out-of-bounds in dsa_user_prechangeupper+0x30/0xe8 [ 43.323835] Read of size 8 at addr ffff3f86481d2990 by task ip/374 [ 43.330058] [ 43.342436] Call trace: [ 43.366542] dsa_user_prechangeupper+0x30/0xe8 [ 43.371024] dsa_user_netdevice_event+0xb38/0xee8 [ 43.375768] notifier_call_chain+0xa4/0x210 [ 43.379985] raw_notifier_call_chain+0x24/0x38 [ 43.384464] __netdev_upper_dev_link+0x3ec/0x5d8 [ 43.389120] netdev_upper_dev_link+0x70/0xa8 [ 43.393424] register_vlan_dev+0x1bc/0x310 [ 43.397554] vlan_newlink+0x210/0x248 [ 43.401247] rtnl_newlink+0x9fc/0xe30 [ 43.404942] rtnetlink_rcv_msg+0x378/0x580 Avoid the kernel oops by dereferencing after the type check, as customary.
What to do
Fixed builds are available from Debian: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 24.04 | linux | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-aws | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-azure | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-azure-fde | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-gcp | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-gke | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-gkeop | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-ibm | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-intel | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-lowlatency | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-nvidia | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-nvidia-lowlatency | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-oem-6.11 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-oem-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-oracle | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-raspi | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-realtime | Not affected vulnerable_code_not_present | ||
| Ubuntu 24.04 | linux-riscv | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-allwinner-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-aws | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-aws-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-aws-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-aws-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-aws-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-azure | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-azure-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-azure-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-azure-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-azure-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-azure-fde | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-azure-fde-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-azure-fde-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-gcp | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-gcp-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-gcp-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-gcp-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-gcp-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-gke | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-gkeop | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-hwe-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-hwe-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-hwe-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-hwe-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-ibm | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-intel-iot-realtime | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-intel-iotg | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-kvm | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-lowlatency | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-lowlatency-hwe-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-lowlatency-hwe-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-lowlatency-hwe-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-lowlatency-hwe-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-nvidia | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-nvidia-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-nvidia-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-nvidia-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-oem-5.17 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-oem-6.0 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-oem-6.1 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-oem-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-oracle | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-oracle-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-oracle-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-raspi | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-realtime | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-riscv | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-riscv-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-riscv-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-riscv-6.8 | Not affected vulnerable_code_not_present | ||
| Ubuntu 22.04 | linux-starfive-5.19 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-starfive-6.2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-starfive-6.5 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 22.04 | linux-xilinx-zynqmp | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | linux-aws-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-aws-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-aws-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-azure-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-azure-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-azure-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-azure-fde | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gcp-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gcp-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gcp-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gke | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gke-5.15 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-gkeop | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | linux-gkeop-5.15 | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | linux-hwe-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-hwe-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-hwe-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-intel-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oem-5.10 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oem-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oem-5.14 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oem-5.6 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oracle-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oracle-5.13 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-oracle-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-raspi2 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-riscv | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-riscv-5.11 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 20.04 | linux-riscv-5.8 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-aws-5.0 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-aws-5.3 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-azure | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-azure-5.3 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-azure-edge | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-gcp | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-gcp-5.3 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-gke-4.15 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-gke-5.0 | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 18.04 | linux-gke-5.3 | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 18.04 | linux-gke-5.4 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-gkeop-5.4 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-hwe | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-hwe-edge | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | linux-oem | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-oem-osp1 | Not affected vulnerable_code_not_present | ||
| Ubuntu 18.04 | linux-oracle-5.0 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-oracle-5.3 | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 18.04 | linux-raspi2 | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 18.04 | linux-raspi2-5.3 | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 16.04 | linux | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-aws | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-aws-hwe | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-azure | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-gcp | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-gke | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 16.04 | linux-hwe | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-hwe-edge | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2024-26596 | |
| Ubuntu 16.04 | linux-kvm | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-oem | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 16.04 | linux-oracle | Not affected vulnerable_code_not_present | ||
| Ubuntu 16.04 | linux-raspi2 | Will not fix Ubuntu decided not to fix this in this release | ||
| Ubuntu 16.04 | linux-snapdragon | Will not fix Ubuntu decided not to fix this in this release | ||
| Debian 14 | linux | Fixed | 6.7.7-1 | DEBIAN-CVE-2024-26596 |
| Debian 13 | linux | Fixed | 6.7.7-1 | DEBIAN-CVE-2024-26596 |
| Debian 12 | linux | Fixed | 6.1.129-1 | DEBIAN-CVE-2024-26596 |
What the vendor says
As published in the CVE record by Linux, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Linux: affected: 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 to before 9e9953f5e4d6d11a9dad56fdee307bb923302809, 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 to before 69a1e2d938dbbfcff0e064269adf60ad26dbb102, 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 to before dbd909c20c11f0d29c0054d41e0d1f668a60e8c8, 4c3f80d22b2eca911143ce656fa45c4699ff5bf4 to before 844f104790bd69c2e4dbb9ee3eba46fde1fcea7b; fixed in
9e9953f5e4d6d11a9dad56fdee307bb923302809,69a1e2d938dbbfcff0e064269adf60ad26dbb102,844f104790bd69c2e4dbb9ee3eba46fde1fcea7b - Linux: affected: 6.1
References
- https://git.kernel.org/stable/c/9e9953f5e4d6d11a9dad56fdee307bb923302809
- https://git.kernel.org/stable/c/69a1e2d938dbbfcff0e064269adf60ad26dbb102
- https://git.kernel.org/stable/c/dbd909c20c11f0d29c0054d41e0d1f668a60e8c8
- https://git.kernel.org/stable/c/844f104790bd69c2e4dbb9ee3eba46fde1fcea7b
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.