Commit 69fb5d9
committed
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: [email protected]
Reported-by: Raphael Zimmer <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
Reviewed-by: Alex Markuze <[email protected]>
Reviewed-by: Viacheslav Dubeyko <[email protected]>1 parent 081a0b7 commit 69fb5d9
1 file changed
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2833 | 2833 | | |
2834 | 2834 | | |
2835 | 2835 | | |
2836 | | - | |
| 2836 | + | |
2837 | 2837 | | |
2838 | 2838 | | |
2839 | 2839 | | |
2840 | 2840 | | |
2841 | 2841 | | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
2842 | 2845 | | |
2843 | 2846 | | |
2844 | 2847 | | |
| |||
2869 | 2872 | | |
2870 | 2873 | | |
2871 | 2874 | | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2872 | 2879 | | |
2873 | 2880 | | |
2874 | 2881 | | |
| |||
0 commit comments