Bug 1220694 (CVE-2021-46969)

Summary: VUL-0: CVE-2021-46969: kernel: bus: mhi: core: Fix invalid error returning in mhi_queue
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/395375/
Whiteboard:
Found By: Security Response Team Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description SMASH SMASH 2024-02-29 13:58:50 UTC
In the Linux kernel, the following vulnerability has been resolved:

bus: mhi: core: Fix invalid error returning in mhi_queue

mhi_queue returns an error when the doorbell is not accessible in
the current state. This can happen when the device is in non M0
state, like M3, and needs to be waken-up prior ringing the DB. This
case is managed earlier by triggering an asynchronous M3 exit via
controller resume/suspend callbacks, that in turn will cause M0
transition and DB update.

So, since it's not an error but just delaying of doorbell update, there
is no reason to return an error.

This also fixes a use after free error for skb case, indeed a caller
queuing skb will try to free the skb if the queueing fails, but in
that case queueing has been done.

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

Patch:
https://git.kernel.org/stable/c/0ecc1c70dcd32c0f081b173a1a5d89952686f271
Comment 1 Andrea Mattiazzo 2024-02-29 14:04:28 UTC
Closing since:
-codestreams below cve/linux-5.3 are not affected
-cve/linux-5.14,stable and SLE15-SP6 have already the patch