Commit 45abc0e
committed
cifs: parse_dfs_referrals: prevent oob on malformed input
JIRA: https://issues.redhat.com/browse/RHEL-114699
commit 6447b0e
Author: Eugene Korenevsky <ekorenevsky@aliyun.com>
Date: Mon Oct 13 21:39:30 2025 +0300
cifs: parse_dfs_referrals: prevent oob on malformed input
Malicious SMB server can send invalid reply to FSCTL_DFS_GET_REFERRALS
- reply smaller than sizeof(struct get_dfs_referral_rsp)
- reply with number of referrals smaller than NumberOfReferrals in the
header
Processing of such replies will cause oob.
Return -EINVAL error on such replies to prevent oob-s.
Signed-off-by: Eugene Korenevsky <ekorenevsky@aliyun.com>
Cc: stable@vger.kernel.org
Suggested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Paulo Alcantara <paalcant@redhat.com>1 parent 823bba4 commit 45abc0e
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
919 | 927 | | |
920 | 928 | | |
921 | 929 | | |
| |||
925 | 933 | | |
926 | 934 | | |
927 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
928 | 945 | | |
929 | 946 | | |
930 | 947 | | |
| |||
0 commit comments