In the Linux kernel, the following vulnerability has been resolved:
libceph: initialize CRUSH choose argument weights
Initialize the CRUSH choose argument weight-set array before decoding so
entries start in a defined state while the decoder fills them.
CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS Score: 9.8
AV:N - The malformed choose_args data (weight_set_size and a truncated weights array) arrives in a CEPH_MSG_OSD_MAP message over TCP from a Ceph monitor or OSD. mon_dispatch()/osd_dispatch() -> ceph_osdc_handle_map() -> ceph_osdmap_decode()/osdmap_apply_incremental() -> crush_decode() -> decode_choose_args() -> decode_choose_arg().
AC:L - The peer sets weight_set_size to N and malforms weight array k < N-1, so decode_array_32_alloc() returns -EINVAL every time. free_choose_arg_map() then kfree()s the uninitialised weight_set[k+1..N-1].weights. N picks the slab size class, and pre-filling that slot with the peer's own u32 weights arrays is the attacker's own grooming. No race.
PR:N - The attacker needs no account or privilege on the client host. It only has to be, or have compromised, a mon or OSD the client talks to. ceph_check_fsid() is the only check before decoding, and a cluster peer knows the fsid.
UI:N - mon_dispatch() and osd_dispatch() process an unsolicited CEPH_MSG_OSD_MAP with no subscription or client-request check. A compromised mon or OSD can push the map to already-connected CephFS/RBD clients at will, and no victim read, write or lookup is needed to trigger it.
S:U - The invalid kfree() happens in the client host's own kernel slab allocator. No hypervisor, VM or IOMMU boundary is crossed.
C:H - kfree() on a stale weight_set[j].weights pointer frees whatever object the leftover or attacker-sprayed value points to while it is still live. The resulting use-after-free gives read primitives into reallocated kernel heap objects.
I:H - The decode error path in free_choose_arg_map() becomes an arbitrary or double free whose target can be chosen by spraying the slot with weights arrays. That allows overlapping live kernel objects and corrupting heap memory, a known route to code execution.
A:H - Freeing a garbage or still-live pointer in slab_free/virt_to_folio oopses or corrupts the heap and crashes the client kernel. The peer can resend the malformed OSD map on every reconnect.
| Attack Vector |
Network |
Scope |
Unchanged |
| Attack Complexity |
Low |
Confidentiality Impact |
High |
| Privileges Required |
None |
Integrity Impact |
High |
| User Interaction |
None |
Availability Impact |
High |
AV:N - The malformed choose_args data (weight_set_size and a truncated weights array) arrives in a CEPH_MSG_OSD_MAP message over TCP from a Ceph monitor or OSD. mon_dispatch()/osd_dispatch() -> ceph_osdc_handle_map() -> ceph_osdmap_decode()/osdmap_apply_incremental() -> crush_decode() -> decode_choose_args() -> decode_choose_arg().
AC:L - The peer sets weight_set_size to N and malforms weight array k < N-1, so decode_array_32_alloc() returns -EINVAL every time. free_choose_arg_map() then kfree()s the uninitialised weight_set[k+1..N-1].weights. N picks the slab size class, and pre-filling that slot with the peer's own u32 weights arrays is the attacker's own grooming. No race.
PR:N - The attacker needs no account or privilege on the client host. It only has to be, or have compromised, a mon or OSD the client talks to. ceph_check_fsid() is the only check before decoding, and a cluster peer knows the fsid.
UI:N - mon_dispatch() and osd_dispatch() process an unsolicited CEPH_MSG_OSD_MAP with no subscription or client-request check. A compromised mon or OSD can push the map to already-connected CephFS/RBD clients at will, and no victim read, write or lookup is needed to trigger it.
S:U - The invalid kfree() happens in the client host's own kernel slab allocator. No hypervisor, VM or IOMMU boundary is crossed.
C:H - kfree() on a stale weight_set[j].weights pointer frees whatever object the leftover or attacker-sprayed value points to while it is still live. The resulting use-after-free gives read primitives into reallocated kernel heap objects.
I:H - The decode error path in free_choose_arg_map() becomes an arbitrary or double free whose target can be chosen by spraying the slot with weights arrays. That allows overlapping live kernel objects and corrupting heap memory, a known route to code execution.
A:H - Freeing a garbage or still-live pointer in slab_free/virt_to_folio oopses or corrupts the heap and crashes the client kernel. The peer can resend the malformed OSD map on every reconnect.
CVSS 3.1