CVE-2022-50748: ipc: mqueue: fix possible memory leak in init_mqueue_fs()
In the Linux kernel, the following vulnerability has been resolved:
ipc: mqueue: fix possible memory leak in initmqueuefs()
commit db7cfc380900 ("ipc: Free mqsysctls if ipc namespace creation failed")
Here's a similar memory leak to the one fixed by the patch above. retiremqsysctls need to be called when initmqueuefs fails after setupmqsysctls.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.19.17 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.0.3 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 6.0.3-1 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Patch db7cfc380900
Event History
Frequently Asked Questions
What condition triggers the leak?
The leak occurs when init_mqueue_fs() fails after setup_mq_sysctls() has completed. The affected error path does not call retire_mq_sysctls() to release the allocated message-queue sysctl resources.
Which kernel packages are identified as affected?
The listed software includes debian/linux and Ubuntu linux-riscv, linux-realtime, linux-hwe-edge, linux-azure, linux-gcp, linux-azure-fde, and linux-gke packages.
What is the available remediation?
Use a kernel build containing the fix that calls retire_mq_sysctls() on the relevant init_mqueue_fs() failure path. The provided stable-kernel references identify backported fixes, but no fixed package versions are supplied.