diff options
| author | sung byeongchan <tjdqudcks0424@naver.com> | 2026-10-08 15:06:46 +0900 |
|---|---|---|
| committer | Ilya Dryomov <idryomov@gmail.com> | 2026-10-26 14:15:47 +0100 |
| commit | bc418e234e5be14b97dec90e84a680e615b4134e (patch) | |
| tree | 8d4a4e02259569632cfda5720010df8a08d820c0 /tools/lib/python/kdoc/parse_data_structs.py | |
| parent | 2377544a8ffe5b617cb9e9f8797fe086a9449a90 (diff) | |
ceph: validate fscrypt auth blob length
ceph_crypt_get_context() trusts cfa_blob_len after checking only that the
inode-owned fscrypt_auth allocation contains the fixed header and one byte.
An MDS can therefore place a larger inner length in a shorter outer object,
causing memcpy() to read beyond the allocation when a caller requests the
encryption nonce.
Require the complete blob to fit in the inode-owned allocation before using
the inner length.
On the tested baseline, the malformed reply produced the same KASAN
slab-out-of-bounds read twice. An ordinary UID obtained sixteen wire-absent
SLUB redzone bytes in two non-KASAN production-path runs. The input was
rejected twice after this change, while a complete context still worked.
Cc: stable@vger.kernel.org
Fixes: 2d332d5bc424 ("ceph: fscrypt_auth handling for ceph")
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
