Skip to content

Commit e0fc5b1

Browse files
committed
SMB3: Fix crash in SMB2_open_init due to uninitialized field in compounding path
Ran into an intermittent crash in SMB2_open_init+0x2f6/0x970 due to oparms.cifs_sb not being initialized when called from: smb2_compound_op+0x45d/0x1690 Zero the whole oparms struct in the compounding path before setting up the oparms so we don't risk any uninitialized fields. Fixes: fdef665 ("smb3: fix mode passed in on create for modetosid mount option") Signed-off-by: Steve French <[email protected]> Acked-by: Ronnie Sahlberg <[email protected]> Reviewed-by: Pavel Shilovsky <[email protected]>
1 parent 2813938 commit e0fc5b1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/cifs/smb2inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
9595
goto finished;
9696
}
9797

98+
memset(&oparms, 0, sizeof(struct cifs_open_parms));
9899
oparms.tcon = tcon;
99100
oparms.desired_access = desired_access;
100101
oparms.disposition = create_disposition;

0 commit comments

Comments
 (0)