diff options
| author | Guanglei Zhu <zhugl3@xiaopeng.com> | 2026-09-10 11:00:36 +0800 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2026-10-26 14:15:47 +0100 |
| commit | cdbb60f00f87297a9db2652847dfc0eaaf3c45aa (patch) | |
| tree | 9aa1be1ba51b00b806eea5e968a71f6b0c1174b1 /include | |
| parent | 9c1d14d3b66b3e1dd96ee664c0dd2548f2b77a52 (diff) | |
ceph: fix out-of-bounds read in ceph_netfs_issue_op_inline()
The read offset is validated against i_size but never against
inline_len, and the two fields come from the MDS independently. When
a read starts past the end of the inline data, the subtraction
len = min_t(size_t, iinfo->inline_len - subreq->start, subreq->len);
underflows and min_t() ends up with subreq->len, so copy_to_iter()
reads past the end of the inline buffer straight into the user
buffer. A malicious or buggy MDS reporting a short inline payload
together with an inflated i_size can thus leak kernel heap memory to
userspace.
Bail out with -ENODATA when the offset is not within the inline
data.
Cc: stable@vger.kernel.org
Fixes: 5b19f1eba459 ("ceph: make ceph_netfs_issue_op() handle inlined data")
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 'include')
0 files changed, 0 insertions, 0 deletions
