net/smc: free pending qentry in smc_llc_flow_stop() before memset
- 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.270, 5.15.221, 6.1.188, 6.6.157, 6.12.110, 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/smc: free pending qentry in smc_llc_flow_stop() before memset smc_llc_flow_stop() resets a flow struct with a blind memset: spin_lock_bh(&lgr->llc_flow_lock); memset(flow, 0, sizeof(*flow)); flow->type = SMC_LLC_FLOW_NONE; spin_unlock_bh(&lgr->llc_flow_lock); If flow->qentry is non-NULL at this point the pointer is overwritten without the allocation being freed, leaking one kmalloc object. A late-arriving duplicate CONFIRM_LINK or ADD_LINK_CONT message can set flow->qentry after the legitimate message has been consumed by the waiter via smc_llc_flow_qentry_clr() (which NULLs the pointer but leaves flow->type non-zero) but before the flow completes and smc_llc_flow_stop() runs. In that window the duplicate is stashed into flow->qentry, and then lost when smc_llc_flow_stop() zeros the struct. Call smc_llc_flow_qentry_del() inside the lock before the memset. smc_llc_flow_qentry_del() already checks flow->qentry before freeing, so the normal case where no entry is pending is a no-op.
Timeline
- CVE published
- Record last updated
Affected versions
- Linux Linux
From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 8e3deb150a5237b672c4579e69a6deb02027dbed; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 11bc373ee6630709f0c2da2e7860c23d503c9e9d; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 032aec7d03c9102616b98fea74f8f7145e7f867c; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 957dba2b8b5aebfe09caa6a6b22b958079082eab; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in f03aa5d36ae3c4068a1c3885146be99aa7fd9307; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 0879ea157acc1ac6752f6fcb755d1f91a2359238; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 5ff429dd6725fa6c1e17a4ed0be8ab675f67a98b; From 555da9af827d95134656fa459c8f3ece04dd867a · fixed in 5ee0ceddc7785c6dcf4a8107fef01f0414a354f4
- Linux Linux
5.8
- KernelLinux
From 5.8.0 · fixed in 5.10.270; From 5.11.0 · fixed in 5.15.221; From 5.16.0 · fixed in 6.1.188; From 6.2.0 · fixed in 6.6.157; From 6.7.0 · fixed in 6.12.110; From 6.13.0 · fixed in 6.18.52; From 6.19.0 · fixed in 7.2.6
References 8
git.kernel.org
- stable/c/8e3deb150a5237b672c4579e69a6deb02027dbed
- stable/c/11bc373ee6630709f0c2da2e7860c23d503c9e9d
- stable/c/032aec7d03c9102616b98fea74f8f7145e7f867c
- stable/c/957dba2b8b5aebfe09caa6a6b22b958079082eab
- stable/c/f03aa5d36ae3c4068a1c3885146be99aa7fd9307
- stable/c/0879ea157acc1ac6752f6fcb755d1f91a2359238
- stable/c/5ff429dd6725fa6c1e17a4ed0be8ab675f67a98b
- stable/c/5ee0ceddc7785c6dcf4a8107fef01f0414a354f4