summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorFelix Hoffmann <f3lix.dev@gmx.de>2026-09-10 13:39:36 +0200
committerIlya Dryomov <idryomov@gmail.com>2026-10-26 14:15:47 +0100
commitd8fc89b5bfe4cb3aebe4c8a818247d11291b841c (patch)
treef4a9fbf07096fa1cb2d6117317984a6a71867d3d /include/linux/debugobjects.h
parent10655007b9b679e46a9e383202c7bb791e5d1d13 (diff)
libceph: reject mismatched CRUSH weight-set sizes
A CEPH_MSG_OSD_MAP message can contain CRUSH choose args with replacement weight vectors for straw2 buckets. decode_choose_args() validates the optional IDs vector against the referenced bucket, but does not validate the size of any replacement-weight vector. The CRUSH mapper assumes that each replacement vector has exactly as many entries as the bucket. A zero-length vector for a nonempty bucket makes bucket_straw2_choose() dereference NULL, while a shorter nonzero vector causes an out-of-bounds read. An authenticated monitor or OSD can deliver such a map and crash a kernel client when it performs placement for an ordinary request. Reject a nonempty collection of weight sets for an absent bucket and require every replacement-weight vector to match its bucket size. Cc: stable@vger.kernel.org Fixes: 5cf9c4a9959b ("libceph, crush: per-pool crush_choose_arg_map for crush_do_rule()") Assisted-by: Codex:gpt-5 Signed-off-by: Felix Hoffmann <f3lix.dev@gmx.de> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions