Bug 2363479 (CVE-2022-49765) - CVE-2022-49765 kernel: net/9p: use a dedicated spinlock for trans_fd
Summary: CVE-2022-49765 kernel: net/9p: use a dedicated spinlock for trans_fd
Keywords:
Status: NEW
Alias: CVE-2022-49765
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Product Security DevOps Team
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-05-01 15:06 UTC by OSIDB Bzimport
Modified: 2025-05-02 05:12 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description OSIDB Bzimport 2025-05-01 15:06:18 UTC
In the Linux kernel, the following vulnerability has been resolved:

net/9p: use a dedicated spinlock for trans_fd

Shamelessly copying the explanation from Tetsuo Handa's suggested
patch[1] (slightly reworded):
syzbot is reporting inconsistent lock state in p9_req_put()[2],
for p9_tag_remove() from p9_req_put() from IRQ context is using
spin_lock_irqsave() on "struct p9_client"->lock but trans_fd
(not from IRQ context) is using spin_lock().

Since the locks actually protect different things in client.c and in
trans_fd.c, just replace trans_fd.c's lock by a new one specific to the
transport (client.c's protect the idr for fid/tag allocations,
while trans_fd.c's protects its own req list and request status field
that acts as the transport's state machine)

Comment 1 Avinash Hanwate 2025-05-02 05:05:53 UTC
Upstream advisory:
https://lore.kernel.org/linux-cve-announce/2025050113-CVE-2022-49765-731b@gregkh/T


Note You need to log in before you can comment on or make changes to this bug.