CVE-2024-36940 pinctrl: core: delete incorrect free in pinctrl_enable()
A double free vulnerability in the Linux kernel pinctrl subsystem allows attackers to cause denial of service or potentially execute code.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2024-36940?
CVE-2024-36940 is a high-severity use after free vulnerability in Debian Debian Linux, published on 30 May 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: core: delete incorrect free in pinctrl_enable()
The "pctldev" struct is allocated in devm_pinctrl_register_and_init(). It's a devm_ managed pointer that is freed by devm_pinctrl_dev_release(), so freeing it in pinctrl_enable() will lead to a double free.
The devm_pinctrl_dev_release() function frees the pindescs and destroys the mutex as well.
Weakness: CWE-415
Which versions are affected by CVE-2024-36940?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2024-36940?
Apply the vendor's patch.
Upgrade to the fixed version. These bugs are found with fuzzing and sanitisers and avoided by memory-safe languages. More about Use after free.
Is CVE-2024-36940 being exploited?
There is no known exploitation of CVE-2024-36940 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2024-36940, DEBIAN-CVE-2024-36940, UBUNTU-CVE-2024-36940.