Linux: ipv4: stop route notification sizing when nexthop group shrinks
What fixes it
- 72d9d17092bb37b0717f12042a0817d01a1f9e78LinuxCVE List
A fixed version on one release line is not the upgrade target for every line. Check your exact version and any vendor backports.
Description
In the Linux kernel, the following vulnerability has been resolved:
ipv4: stop route notification sizing when nexthop group shrinks
Commit 680aea08e78c ("net: ipv4: Emit notification when fib hardware flags are changed") added an RCU-only fib_nlmsg_size() call for asynchronous hardware flag notifications.
fib_nlmsg_size() checks fib_info_num_path() before each iteration, then fib_info_nhc() independently reloads nh->nh_grp. If RTM_NEWNEXTHOP replaces a group with fewer paths between those loads, fib_info_nhc() returns NULL and fib_nexthop_nlmsg_size() dereferences it.
Stop sizing when the indexed path is absent. Nexthop groups are dense, so the current snapshot has no later path.
Text from CVE List
Affected versions 12
- Linuxaffected: 680aea08e78c003292415518ad270bc20f9c80b1 before 72d9d17092bb37b0717f12042a0817d01a1f9e78CVE List
- Linuxaffected: 680aea08e78c003292415518ad270bc20f9c80b1 before ad1c9f1b98c92609e9bb2ae8f05916defc3b0a54CVE List
- Linuxaffected: 680aea08e78c003292415518ad270bc20f9c80b1 before c1f48d1c2d5e9efd904dbbc2f2b3d41543e55c49CVE List
- Linuxaffected: 680aea08e78c003292415518ad270bc20f9c80b1 before ad2b3a68b8a7d5d27de88e05674e4adb1ce46d88CVE List
- Linuxaffected: 680aea08e78c003292415518ad270bc20f9c80b1 before d3daa33c7af92e38f2274bbd2576f58bfbaf89e6CVE List
- Linuxaffected: 5.12CVE List
- Linuxunaffected: all versions before 5.12CVE List
- Linuxunaffected: 6.6.160 through 6.6.*CVE List
- Linuxunaffected: 6.12.113 through 6.12.*CVE List
- Linuxunaffected: 6.18.57 through 6.18.*CVE List
- Linuxunaffected: 7.2.11 through 7.2.*CVE List
- Linuxunaffected: 7.3CVE List
References 5
- git.kernel.org/stable/c/72d9d17092bb37b0717f12042a0817d01a1f9e78Referencevia CVE List
- git.kernel.org/stable/c/ad1c9f1b98c92609e9bb2ae8f05916defc3b0a54Referencevia CVE List
- git.kernel.org/stable/c/c1f48d1c2d5e9efd904dbbc2f2b3d41543e55c49Referencevia CVE List
- git.kernel.org/stable/c/ad2b3a68b8a7d5d27de88e05674e4adb1ce46d88Referencevia CVE List
- git.kernel.org/stable/c/d3daa33c7af92e38f2274bbd2576f58bfbaf89e6Referencevia CVE List