Commit aab98e2
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: 0626e66 ("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>
Signed-off-by: Steve French <stfrench@microsoft.com>1 parent b2d9937 commit aab98e2
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
630 | 633 | | |
631 | 634 | | |
632 | 635 | | |
| |||
806 | 809 | | |
807 | 810 | | |
808 | 811 | | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
809 | 815 | | |
810 | 816 | | |
811 | 817 | | |
| |||
854 | 860 | | |
855 | 861 | | |
856 | 862 | | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
857 | 866 | | |
858 | 867 | | |
859 | 868 | | |
| |||
0 commit comments