net: rose: fix invalid array index in rose_kill_by_device()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 64b8bc7d5f1434c636a40bdcfcd42b278d1714be · < 92d900aac3a5721fb54f3328f1e089b44a861c38| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: rose: fix invalid array index in rose_kill_by_device()
rose_kill_by_device() collects sockets into a local array[] and then iterates over them to disconnect sockets bound to a device being brought down.
The loop mistakenly indexes array[cnt] instead of array[i]. For cnt < ARRAY_SIZE(array), this reads an uninitialized entry; for cnt == ARRAY_SIZE(array), it is an out-of-bounds read. Either case can lead to an invalid socket pointer dereference and also leaks references taken via sock_hold().
Fix the index to use i.
From the CVE record · Linux
The Linux kernel’s ROSE code uses the wrong array index when disconnecting sockets bound to a device being brought down. This can read an uninitialized or out-of-bounds entry, potentially dereferencing an invalid socket pointer and leaking socket references. The input does not specify whether an attacker can trigger this remotely or locally, or whether authentication or user interaction is required.
Engineers running the Linux kernel should check whether their version includes the ROSE index fix; affected versions are not specified.