Bug 1220699 (CVE-2021-46973)

Summary: VUL-0: CVE-2021-46973: kernel: net: qrtr: Avoid potential use after free in MHI send
Product: [Novell Products] SUSE Security Incidents Reporter: SMASH SMASH <smash_bz>
Component: IncidentsAssignee: Security Team bot <security-team>
Status: RESOLVED FIXED QA Contact: Security Team bot <security-team>
Severity: Normal    
Priority: P3 - Medium CC: andrea.mattiazzo, mhocko
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: Other   
URL: https://smash.suse.de/issue/395379/
Whiteboard: CVSSv3.1:SUSE:CVE-2021-46973:5.3:(AV:L/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L)
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-02-29 15:08:35 UTC
In the Linux kernel, the following vulnerability has been resolved:

net: qrtr: Avoid potential use after free in MHI send

It is possible that the MHI ul_callback will be invoked immediately
following the queueing of the skb for transmission, leading to the
callback decrementing the refcount of the associated sk and freeing the
skb.

As such the dereference of skb and the increment of the sk refcount must
happen before the skb is queued, to avoid the skb to be used after free
and potentially the sk to drop its last refcount..

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-46973
https://www.cve.org/CVERecord?id=CVE-2021-46973
https://bugzilla.redhat.com/show_bug.cgi?id=2266828
https://lore.kernel.org/linux-cve-announce/2024022721-CVE-2021-46973-20ce@gregkh/T/#u

Patch:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=47a017f33943
Comment 1 Andrea Mattiazzo 2024-02-29 15:09:32 UTC
Closing since:

-codestream below 5.14 are not affected
-cve/linux-5.14, stable and SLE15-SP6 are already patched