net/iucv: fix locking in .getsockopt
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 51363b8751a673a00ad48eea895266396d53fa52 · < 9817369243380e287ebe5525411557eaa3aa2a79| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/iucv: fix locking in .getsockopt
Mirror iucv_sock_setsockopt() and wrap the whole switch in lock_sock()/release_sock(). The pre-existing SO_MSGLIMIT-only lock becomes redundant and is removed.
Any AF_IUCV HIPER user can potentially crash the kernel by racing recvmsg() with getsockopt(SO_MSGSIZE): the SO_MSGSIZE arm dereferences iucv->hs_dev->mtu after iucv_sock_close() (called from the racing recvmsg()) has set hs_dev to NULL, producing a NULL pointer dereference oops.
From the CVE record · Linux
A locking flaw in the Linux kernel’s AF_IUCV HIPER socket handling can cause a NULL pointer dereference. A user able to use AF_IUCV HIPER can potentially crash the kernel by racing recvmsg() with getsockopt(SO_MSGSIZE); no separate user interaction is described.
Anyone running a Linux kernel with AF_IUCV HIPER support should check whether their kernel includes the fix.