net: dsa: mv88e6xxx: bound the policy rule dump by the caller's buffer size
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.271, 5.15.222, 6.1.189, 6.6.158, 6.12.111, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
Summary
In the Linux kernel, the following vulnerability has been resolved: net: dsa: mv88e6xxx: bound the policy rule dump by the caller's buffer size mv88e6xxx_get_rxnfc() uses rxnfc->rule_cnt as the write index while dumping the policy IDR, clobbering the input value before it has been looked at. That input is the number of entries the caller had room for. ETHTOOL_GRXCLSRLALL requires no CAP_NET_ADMIN and the ioctl sizes the buffer from the rule_cnt userspace passes in, so once an admin has installed policy rules any user can ask for fewer slots than there are rules and run off the end of the allocation. A rule_cnt of 0 leaves the buffer pointer NULL and the walk dereferences it. Count into a local so the caller's limit survives the walk, and stop with -EMSGSIZE once it is reached.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in 7e4bfc5f0b66feb22cba821303fc25ca22cd0887; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in 01124cd2cf4b71755b1130ac82d78dcfbd5d69e3; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in 609c4378f212cf580aae02250f1146caf63d873f; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in c5b5c52b6524c9fb50def2260baac745c095ec3a; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in 44cd4674d9aa5bdf793b8a8b481c9e8536ed6070; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in 7a683c2b062810bca203e41866389daf387c235b; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in cda5ac8fe8ac8e80b1703ebb8c4250726fc19739; From da7dc87553046a43be1620a783ce3d9f6583d322 · fixed in b1fffc273112e7284c5b705e186b43b5770cd3d5
- Linux Linux
5.4
- KernelLinux
From 5.4.0 · fixed in 5.10.271; From 5.11.0 · fixed in 5.15.222; From 5.16.0 · fixed in 6.1.189; From 6.2.0 · fixed in 6.6.158; From 6.7.0 · fixed in 6.12.111; From 6.13.0 · fixed in 6.18.53; From 6.19.0 · fixed in 7.2.7
References 8
git.kernel.org
- stable/c/7e4bfc5f0b66feb22cba821303fc25ca22cd0887
- stable/c/01124cd2cf4b71755b1130ac82d78dcfbd5d69e3
- stable/c/609c4378f212cf580aae02250f1146caf63d873f
- stable/c/c5b5c52b6524c9fb50def2260baac745c095ec3a
- stable/c/44cd4674d9aa5bdf793b8a8b481c9e8536ed6070
- stable/c/7a683c2b062810bca203e41866389daf387c235b
- stable/c/cda5ac8fe8ac8e80b1703ebb8c4250726fc19739
- stable/c/b1fffc273112e7284c5b705e186b43b5770cd3d5