misc: bcm_vk: Fix possible null-pointer dereferences in bcm_vk_read()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 88517757a829e9ce146a6c7233ad5dcdc66fcbb0 · < ba75ecb97d3f4e95d59002c13afb6519205be6cb| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
misc: bcm_vk: Fix possible null-pointer dereferences in bcm_vk_read()
In the function bcm_vk_read(), the pointer entry is checked, indicating that it can be NULL. If entry is NULL and rc is set to -EMSGSIZE, the following code may cause null-pointer dereferences:
struct vk_msg_blk tmp_msg = entry->to_h_msg[0]; set_msg_id(&tmp_msg, entry->usr_msg_id); tmp_msg.size = entry->to_h_blks - 1;
To prevent these possible null-pointer dereferences, copy to_h_msg, usr_msg_id, and to_h_blks from iter into temporary variables, and return these temporary variables to the application instead of accessing them through a potentially NULL entry.
From the CVE record · Linux
The Linux kernel's bcm_vk_read() can dereference a NULL pointer when entry is NULL and rc is set to -EMSGSIZE. A caller who reaches this path could trigger the dereference; the input does not specify authentication requirements or user interaction.
Teams running Linux kernels with the bcm_vk component should check whether their kernel includes this fix; affected versions are not specified.