summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorsung byeongchan <tjdqudcks0424@naver.com>2026-10-08 15:07:25 +0900
committerIlya Dryomov <idryomov@gmail.com>2026-10-26 14:15:48 +0100
commit8cab7e7461f81ea1e0fd45082b50bb3c04c0bb10 (patch)
tree299f7fdc3cbf8ad36573bedb5b9f76fa0a6dafa2 /tools/lib/python/kdoc/parse_data_structs.py
parent7f702e1703c9648fcb02a217d66c880d00417150 (diff)
ceph: validate MDS reply fragtree split array length
parse_reply_info_in() advances over the fragtree split array using an unchecked count multiplication. On a 32-bit client, nsplits=0x20000000 wraps the byte length to zero, so the reply is accepted and ceph_fill_fragtree() sorts far beyond the message front. Compute the split length with size_mul() and require the complete array to remain in the inode record before advancing the cursor. The malformed reply faulted in frag_tree_split_cmp() twice on the tested i386 baseline. It was rejected without a fault twice after this change, while a normal reply and a one-split control remained functional. Cc: stable@vger.kernel.org Fixes: 2f2dc053404f ("ceph: MDS client") Assisted-by: LLM Signed-off-by: sung byeongchan <tjdqudcks0424@naver.com> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions