]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
libceph: prevent potential out-of-bounds reads in process_message_header()
authorIlya Dryomov <idryomov@gmail.com>
Sun, 8 Mar 2026 16:38:00 +0000 (17:38 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 10 Mar 2026 11:15:36 +0000 (12:15 +0100)
commit69fb5d91bba44ecf7eb80530b85fa4fb028921d5
treede4952b4192cd67a3cd1ab34205bee46c100c364
parent081a0b78ef30f5746cda3e92e28b4d4ae92901d1
libceph: prevent potential out-of-bounds reads in process_message_header()

If the message frame is (maliciously) corrupted in a way that the
length of the control segment ends up being less than the size of the
message header or a different frame is made to look like a message
frame, out-of-bounds reads may ensue in process_message_header().

Perform an explicit bounds check before decoding the message header.

Cc: stable@vger.kernel.org
Reported-by: Raphael Zimmer <raphael.zimmer@tu-ilmenau.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Alex Markuze <amarkuze@redhat.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
net/ceph/messenger_v2.c