Linux
rxrpc: Fix recvmsg() unconditional requeue
In the Linux kernel, the following vulnerability has been resolved: rxrpc: Fix recvmsg() unconditional requeue If rxrpc_recvmsg() fails because MSG_DONTWAIT was specified but the call at the front of the recvmsg queue already has its mutex locked, it requeues the call - whether or not the call is already queued. The call may be on the queue because MSG_PEEK was also passed and so the call was not dequeued or because the I/O thread requeued it. The unconditional requeue may then corrupt the recvmsg queue, leading to things like UAFs or refcount underruns. Fix this by only requeuing the call if it isn't already on the queue - and moving it to the front if it is already queued. If we don't queue it, we have to put the ref we obtained by dequeuing it. Also, MSG_PEEK doesn't dequeue the call so shouldn't call rxrpc_notify_socket() for the call if we didn't use up all the data on the queue, so fix that also.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < 8fd3b5e297854a4da0f273169baf4b1b7b257b97
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < c198628f3fca5c874d93874c233014d336e09f64
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < c6cebcb4e0b3140ec2ace45c020a9049527385d1
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < 0464bf75590da75b8413c3e758c04647b4cdb3c6
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < cf969bddd6e69c5777fa89dc88402204e72f312a
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < 930114425065f7ace6e0c0630fab4af75e059ea8
- >= 540b1c48c37ac0ad66212004db21e1ff7e2d78be, < 2c28769a51deb6022d7fbd499987e237a01dd63a
Fixed in 8fd3b5e297854a4da0f273169baf4b1b7b257b97, c198628f3fca5c874d93874c233014d336e09f64, c6cebcb4e0b3140ec2ace45c020a9049527385d1, 0464bf75590da75b8413c3e758c04647b4cdb3c6, cf969bddd6e69c5777fa89dc88402204e72f312a, 930114425065f7ace6e0c0630fab4af75e059ea8, 2c28769a51deb6022d7fbd499987e237a01dd63a
- 4.11
Fixed in 0, 5.10.258, 5.15.209, 6.1.175, 6.6.130, 6.12.78, 6.18.8, 6.19
Mitigation
Upgrade Linux to 8fd3b5e297854a4da0f273169baf4b1b7b257b97 or c198628f3fca5c874d93874c233014d336e09f64 or c6cebcb4e0b3140ec2ace45c020a9049527385d1 or 0464bf75590da75b8413c3e758c04647b4cdb3c6 or cf969bddd6e69c5777fa89dc88402204e72f312a or 930114425065f7ace6e0c0630fab4af75e059ea8 or 2c28769a51deb6022d7fbd499987e237a01dd63a or later.
Upgrade Linux to 0 or 5.10.258 or 5.15.209 or 6.1.175 or 6.6.130 or 6.12.78 or 6.18.8 or 6.19 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.