CVE-2024-27412 power: supply: bq27xxx-i2c: Do not free non existing IRQ
A missing check in the bq27xxx I2C driver causes a kernel warning and potential crash when unbinding a device without an IRQ.
- 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-27412?
CVE-2024-27412 is a medium-severity vulnerability in Debian Debian Linux, published on 17 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:
power: supply: bq27xxx-i2c: Do not free non existing IRQ
The bq27xxx i2c-client may not have an IRQ, in which case client->irq will be 0. bq27xxx_battery_i2c_probe() already has an if (client->irq) check wrapping the request_threaded_irq().
But bq27xxx_battery_i2c_remove() unconditionally calls free_irq(client->irq) leading to:
[ 190.310742] ------------[ cut here ]------------ [ 190.310843] Trying to free already-free IRQ 0 [ 190.310861] WARNING: CPU: 2 PID: 1304 at kernel/irq/manage.c:1893 free_irq+0x1b8/0x310
Followed by a backtrace when unbinding the driver. Add an if (client->irq) to bq27xxx_battery_i2c_remove() mirroring probe() to fix this.
Which versions are affected by CVE-2024-27412?
It affects 2 products.
Products include Debian Debian Linux, Linux kernel.
How do I fix CVE-2024-27412?
Apply the vendor's patch.
Is CVE-2024-27412 being exploited?
There is no known exploitation of CVE-2024-27412 in the wild and no public exploit code.
Other vulnerabilities in Debian Debian Linux
Sources
Also known as BELL-CVE-2024-27412, DEBIAN-CVE-2024-27412, GHSA-8qjm-4vw9-3w5g, UBUNTU-CVE-2024-27412.