net/iucv: fix use-after-free of a severed iucv_path
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f0703c80e5156406ad947cb67fe277725b48080f · < 900cd6d8119b7f3ae5c4bf82f922ff5957df43db| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/iucv: fix use-after-free of a severed iucv_path
af_iucv queues not-yet-received message notifications on iucv->message_q, each holding a raw pointer to the connection's iucv_path. When the peer severs the connection, iucv_sever_path() frees that path with iucv_path_free() but leaves the notifications queued. A later recvmsg() drains message_q via iucv_process_message_q() and hands the stale path to message_receive() -- a use-after-free of the freed iucv_path.
Drop the queued notifications when the path is severed; once the path is gone they can no longer be received. This also frees the notifications leaked when a socket is closed with messages still queued.
From the CVE record · Linux
The Linux kernel's af_iucv code can retain queued message notifications that point to a freed connection path. If a peer severs the connection and the socket later calls recvmsg(), processing those notifications causes a use-after-free. The input does not specify authentication requirements.
Engineers running Linux kernels with the affected net/iucv code should check their kernel versions; affected versions are not specified.