Commit b9515af
Walid Nejmi
Validate offload block request lengths
Check the received and declared payload sizes before processing block
requests and add defensive bounds checks to block request handling.
The payload offset is derived with offsetof() rather than sizeof(), since
the message struct ends in a flexible-style array and sizeof() may include
trailing padding.
Signed-off-by: Walid Nejmi <wnejmi@bloomberg.net>1 parent 442406b commit b9515af
2 files changed
Lines changed: 37 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | | - | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
883 | 893 | | |
884 | | - | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
885 | 900 | | |
886 | 901 | | |
887 | 902 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3642 | 3642 | | |
3643 | 3643 | | |
3644 | 3644 | | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
3645 | 3653 | | |
3646 | 3654 | | |
3647 | | - | |
3648 | | - | |
3649 | | - | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
3650 | 3667 | | |
3651 | 3668 | | |
3652 | 3669 | | |
| |||
0 commit comments