summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorRaphael Zimmer <raphael.zimmer@tu-ilmenau.de>2026-09-09 16:59:13 +0200
committerIlya Dryomov <idryomov@gmail.com>2026-10-26 14:15:47 +0100
commit0405670e50f213594366ab7eddc07002bd7f84c0 (patch)
treeeab80a7e7960d1fdffb5b981af953b85bc578c70 /include/linux
parentd6c7a5fcd08873c45a2dcd645a0690fd1443af50 (diff)
libceph: Fix unsafe decode in ceph_redirect_decode()
ceph_redirect_decode handles unchecked data received over the network from an OSD. Currently, there is only a bounds check covering the first three decode operations. After decoding the first len field from the message, the only remaining check ensures there is enough buffer space to hold len bytes. However, there is no guarantee that this value is large enough to hold the subsequently decoded fields. The decoding of the second len field is missing an explicit bounds check. Consequently, a corrupted message can trigger an out-of-bounds read. This patch fixes the issue by switching the decoding from ceph_decode_32() to the bounds-checked version ceph_decode_32_safe(). Cc: stable@vger.kernel.org Fixes: 205ee1187a67 ("libceph: follow redirect replies from osds") Assisted-by: Cursor Signed-off-by: Raphael Zimmer <raphael.zimmer@tu-ilmenau.de> Reviewed-by: Alex Markuze <amarkuze@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions