net/af_iucv: fix NULL deref in afiucv_hs_callback_syn()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3881ac441f642d56503818123446f7298442236b · < 33736ff5e7c97d3348ce812e8bd2e125d840743c| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/af_iucv: fix NULL deref in afiucv_hs_callback_syn()
afiucv_hs_callback_syn() allocates the child socket with GFP_ATOMIC. If the allocation fails, nsk is NULL.
The connection-refused path is entered when the listen state check fails, the accept backlog is full, or nsk is NULL. The code unconditionally calls iucv_sock_kill(nsk) in that path.
iucv_sock_kill() does not accept a NULL socket pointer and immediately dereferences sk via sock_flag(sk, SOCK_ZAPPED). When nsk is NULL, calling iucv_sock_kill(nsk) results in a NULL pointer dereference.
Only call iucv_sock_kill() when a child socket was successfully allocated.
From the CVE record · Linux
The Linux kernel's AF_IUCV connection callback can dereference a NULL pointer when child-socket allocation fails during connection handling. A connection attempt that reaches this failure path can trigger the dereference; the input does not specify authentication or user-interaction requirements.
Engineers running Linux kernels with the affected net/af_iucv code should check their versions; affected version numbers were not provided.