CVE-2026-99895 PUBLISHED

libceph: fix out-of-bounds reads from repeated CRUSH bucket entries

Assigner: Linux
Reserved: 25.09.2026 Published: 30.11.2026 Updated: 01.12.2026

In the Linux kernel, the following vulnerability has been resolved:

libceph: fix out-of-bounds reads from repeated CRUSH bucket entries

decode_choose_arg() assumes that its destination is zero-initialized. Although decode_choose_args() zeroes the argument array, it does not reject a repeated bucket_index and can decode into an already populated entry.

Repeating a bucket with weight_set_size=0 preserves its existing weight_set pointer but clears the count. Placement then reads weight_set[-1].weights and dereferences the resulting pointer.

A malformed monitor OSDMap triggers this during RBD placement:

BUG: KASAN: slab-out-of-bounds in crush_bucket_choose+0xdd1/0xf90 Read of size 8 at addr ffff88800290df70 by task init/75

Reject populated arguments before decoding another entry, so the error path can free their original allocations.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS Score: 9.1

AV:N - The repeated bucket_index with weight_set_size=0 is carried inside the CRUSH map of a CEPH_MSG_OSD_MAP message, sent over the client's TCP messenger connection by a monitor or OSD. The path is mon_dispatch()/osd_dispatch() -> ceph_osdc_handle_map() -> handle_one_map() -> crush_decode() -> decode_choose_args() -> decode_choose_arg(). AC:L - The sender writes the whole map: a straw2 bucket on the rule path and a choose_args entry at index -1, which do_crush() uses for every pool. The entry lists the bucket twice, the second time with weight_set_size=0. get_choose_arg_weights() then clamps position to -1 on every calc_target(). Grooming the neighbouring slab object with its own u32 arrays is the attacker's own work, and no race is involved. PR:N - ceph_osdc_handle_map() checks only ceph_check_fsid(), which adopts the message's fsid if the client has none yet. mon dispatch passes CEPH_MSG_OSD_MAP on without checking authentication state. A malicious or compromised monitor or OSD therefore needs no account or privilege on the client host. UI:N - The map can be pushed without a request. handle_one_map() -> scan_requests() -> recalc_linger_target() -> calc_target() -> do_crush() runs for the linger request behind the always-registered RBD header watch. The read therefore fires on map receipt, with no victim I/O or other action. S:U - The out-of-bounds read and the wild-pointer dereference happen in the client kernel's own CRUSH mapper, bucket_straw2_choose(). They stay inside the kernel's security authority and cross no VM, IOMMU or sandbox boundary. C:H - bucket_straw2_choose() reads the 8-byte weight_set[-1].weights pointer from the adjacent slab object, then reads h.size u32 values through it. If the neighbour is groomed, that pointer is attacker-chosen. Because the values drive the straw2 argmax, the OSD the client contacts acts as a repeatable oracle on memory at an arbitrary address: more than a few bytes. I:N - Nothing is written. A repeated entry only overwrites arg->ids or arg->weight_set and leaks the old allocations. free_choose_arg_map() loops over weight_set_size=0, so there is no double free. The mapper returns an in-bounds bucket->h.items[high] from the attacker's own map. A:H - The leftover weight_set[-1].weights value is garbage, such as a SLUB free pointer or attacker u32 data. Dereferencing it faults in crush_bucket_choose() inside calc_target() while osdc->lock is held for write. That oopses the client, stalls all Ceph I/O and panics with panic_on_oops, and the sender can resend the map on every reconnect.

Product Status

Vendor Linux
Product Linux
Versions Default: unaffected
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to b0aaa76def75180f640a734759ea896259750ded (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 4fde92e1589dfb637e242f6ad70f905975ce7504 (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 5ed5fa697e0e5b4731f5307157ecd0b01de4fd56 (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 6e1de78661794fc9f546766696faeee99285a079 (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 367803db119e3f1aadb59869c43dbb2002d206c6 (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to e1cf4b41bfbe86f06f272e4c9e87e383d62014fa (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 3ac5e7f512efbadfffd2d13888dc23c43754a5dd (excl.)
  • affected from c7ed1a4bf4b446317eefa0f4916d94b1f6d3ada5 to 569a9bb1e5615c2b88b8d76f03a4ab82e65a673e (excl.)
Vendor Linux
Product Linux
Versions Default: affected
  • Version 4.13 is affected
  • unaffected from 0 to 4.13 (excl.)
  • unaffected from 5.10.275 to 5.10.* (incl.)
  • unaffected from 5.15.226 to 5.15.* (incl.)
  • unaffected from 6.1.193 to 6.1.* (incl.)
  • unaffected from 6.6.163 to 6.6.* (incl.)
  • unaffected from 6.12.117 to 6.12.* (incl.)
  • unaffected from 6.18.63 to 6.18.* (incl.)
  • unaffected from 7.3.4 to 7.3.* (incl.)
  • unaffected from 7.4-rc1 to * (incl.)

References