Skip to content

Commit 3f509c2

Browse files
committed
Merge: [CVE-2025-21963] cifs: Fix integer overflow while processing acdirmax mount option
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/merge_requests/945 - Fix integer overflow while processing acdirmax mount option JIRA: https://issues.redhat.com/browse/RHEL-87947 CVE: CVE-2025-21963 Signed-off-by: Paulo Alcantara <paalcant@redhat.com> Approved-by: Benjamin Coddington <bcodding@redhat.com> Approved-by: Jay Shin <jaeshin@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Approved-by: David Howells <dhowells@redhat.com> Merged-by: Julio Faracco <jfaracco@redhat.com>
2 parents c44deff + babdb6d commit 3f509c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/smb/client/fs_context.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,11 +1293,11 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
12931293
ctx->acregmax = HZ * result.uint_32;
12941294
break;
12951295
case Opt_acdirmax:
1296-
ctx->acdirmax = HZ * result.uint_32;
1297-
if (ctx->acdirmax > CIFS_MAX_ACTIMEO) {
1296+
if (result.uint_32 > CIFS_MAX_ACTIMEO / HZ) {
12981297
cifs_errorf(fc, "acdirmax too large\n");
12991298
goto cifs_parse_mount_err;
13001299
}
1300+
ctx->acdirmax = HZ * result.uint_32;
13011301
break;
13021302
case Opt_actimeo:
13031303
if (HZ * result.uint_32 > CIFS_MAX_ACTIMEO) {

0 commit comments

Comments
 (0)