Commit ee998af
ksmbd: fix integer overflows on 32 bit systems
On 32bit systems the addition operations in ipc_msg_alloc() can
potentially overflow leading to memory corruption.
Add bounds checking using KSMBD_IPC_MAX_PAYLOAD to avoid overflow.
Fixes: 0626e6641f6b ("cifsd: add server handler for central processing and tranport layers")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>1 parent 88e6e7f commit ee998af
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
628 | 628 | | |
629 | 629 | | |
630 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
631 | 634 | | |
632 | 635 | | |
633 | 636 | | |
| |||
807 | 810 | | |
808 | 811 | | |
809 | 812 | | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
810 | 816 | | |
811 | 817 | | |
812 | 818 | | |
| |||
855 | 861 | | |
856 | 862 | | |
857 | 863 | | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
858 | 867 | | |
859 | 868 | | |
860 | 869 | | |
| |||
880 | 889 | | |
881 | 890 | | |
882 | 891 | | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
883 | 895 | | |
884 | 896 | | |
885 | 897 | | |
| |||
0 commit comments