diff options
| author | 2026-09-10 11:00:35 +0800 | |
|---|---|---|
| committer | 2026-10-26 14:15:47 +0100 | |
| commit | 9c1d14d3b66b3e1dd96ee664c0dd2548f2b77a52 (patch) | |
| tree | d79c73816c92a086ba91ab8fd84aa8c0d0a0ec99 /scripts/Makefile.thinlto | |
| parent | ceph: fix longname buffer overflow in ceph_fname_to_usr() (diff) | |
ceph: clamp the inline data length in ceph_fill_inline_data()
The MDS decides how much inline data to attach to a reply, and the
client parses inline_len without any upper bound: ceph_decode_need()
only verifies that the message actually carries that many bytes.
ceph_fill_inline_data() then copies the data into a single folio
with no length check, so a malicious or buggy MDS returning more
inline data than the folio can hold writes past its end.
Clamp the length to folio_size() so both callers, handle_cap_grant()
and fill_inode(), are covered.
Cc: stable@vger.kernel.org
Fixes: 31c542a199d7 ("ceph: add inline data to pagecache")
Signed-off-by: Guanglei Zhu <zhugl3@xiaopeng.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
