libceph: Fix potential out-of-bounds access in osdmap_decode()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ dcbc919a5dc8c2629684a113a90c0b6fe10c3462 · < 48df98d12b15360cd56af5c1f460307b340c1197| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
libceph: Fix potential out-of-bounds access in osdmap_decode()
When decoding osd_state and osd_weight from an incoming osdmap in osdmap_decode(), both are decoded for each osd, i.e., map->max_osd times. The ceph_decode_need() check only accounts for sizeof(*map->osd_weight) once. This can potentially result in an out-of-bounds memory access if the incoming message is corrupted such that the max_osd value exceeds the actual content of the osdmap message.
This patch fixes the issue by changing the corresponding part in the ceph_decode_need() check to account for map->max_osd*sizeof(*map->osd_weight).
From the CVE record · Linux
The Linux kernel’s libceph osdmap_decode() can access memory out of bounds when an incoming osdmap is corrupted so that max_osd exceeds the message’s actual content. The input does not specify whether an attacker can trigger this over a network, whether authentication is needed, or whether user interaction is required.
Engineers running Linux kernels that include libceph should check whether their kernel is affected; affected versions are not specified.