scsi: qla4xxx: Add length check when parsing nlattrs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 00c31889f7513e9ffa6b2b4de8ad6d7f59a61c80 · < 25feffb3fbd51ae81d92c65cebc0e932663828b3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: qla4xxx: Add length check when parsing nlattrs
There are three places that qla4xxx parses nlattrs:
- qla4xxx_set_chap_entry()
- qla4xxx_iface_set_param()
- qla4xxx_sysfs_ddb_set_param()
and each of them directly converts the nlattr to specific pointer of structure without length checking. This could be dangerous as those attributes are not validated and a malformed nlattr (e.g., length 0) could result in an OOB read that leaks heap dirty data.
Add the nla_len check before accessing the nlattr data and return EINVAL if the length check fails.
From the CVE record · Linux
The Linux kernel’s qla4xxx SCSI driver did not check attribute lengths in three netlink-attribute parsing paths. A malformed attribute could cause an out-of-bounds read that leaks heap data. The input does not specify whether exploitation requires local access, authentication, or user interaction.
Engineers running Linux kernels with the qla4xxx driver should check whether their kernel includes the length-check fix; affected versions are not specified.