media: bttv: fix use after free error due to btv->timeout timer
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 162e6376ac58440beb6a2d2ee294f5d88ea58dd1 · < 1871014d6ef4812ad11ef7d838d73ce09d632267| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: bttv: fix use after free error due to btv->timeout timer
There may be some a race condition between timer function bttv_irq_timeout and bttv_remove. The timer is setup in probe and there is no timer_delete operation in remove function. When it hit kfree btv, the function might still be invoked, which will cause use after free bug.
This bug is found by static analysis, it may be false positive.
Fix it by adding del_timer_sync invoking to the remove function.
cpu0 cpu1 bttv_probe ->timer_setup ->bttv_set_dma ->mod_timer; bttv_remove ->kfree(btv); ->bttv_irq_timeout ->USE btv
From the CVE record · Linux
A race between the bttv timeout callback and device removal could cause a use-after-free if the callback runs after the device is freed. The issue was found by static analysis and may be a false positive; the input does not establish an attacker path or access requirements.
Engineers running Linux kernels with the bttv driver should check whether their kernel includes the fix; affected versions are not specified.