loop: loop_set_status_from_info() check before assignment
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 0455bef69028c65065f16bb04635591b2374249b · < 3e7d0968203d668af6036b9f9199c7b62c8a3581| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
loop: loop_set_status_from_info() check before assignment
In loop_set_status_from_info(), lo->lo_offset and lo->lo_sizelimit should be checked before reassignment, because if an overflow error occurs, the original correct value will be changed to the wrong value, and it will not be changed back.
More, the original patch did not solve the problem, the value was set and ioctl returned an error, but the subsequent io used the value in the loop driver, which still caused an alarm:
loop_handle_cmd do_req_filebacked loff_t pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset; lo_rw_aio cmd->iocb.ki_pos = pos
From the CVE record · Linux
The Linux kernel loop driver can retain an invalid offset or size limit after an overflow error in loop_set_status_from_info(). Although the ioctl returns an error, subsequent I/O can use the invalid value. The input does not specify attacker access requirements or user interaction.
Engineers running Linux kernels with the loop driver should check their kernel versions; affected versions are not specified.