Skip to content

Commit

Permalink
Merge tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sf…
Browse files Browse the repository at this point in the history
…rench/cifs-2.6

Pull smb client fix from Steve French:

 - Fix potential null pointer dereference

* tag 'v6.14-rc3-smb3-client-fix-part2' of git://git.samba.org/sfrench/cifs-2.6:
  smb: client: Add check for next_buffer in receive_encrypted_standard()
  • Loading branch information
torvalds committed Feb 23, 2025
2 parents 5cf8061 + 860ca5e commit 27102b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/smb/client/smb2ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -4965,6 +4965,10 @@ receive_encrypted_standard(struct TCP_Server_Info *server,
next_buffer = (char *)cifs_buf_get();
else
next_buffer = (char *)cifs_small_buf_get();
if (!next_buffer) {
cifs_server_dbg(VFS, "No memory for (large) SMB response\n");
return -1;
}
memcpy(next_buffer, buf + next_cmd, pdu_length - next_cmd);
}

Expand Down

0 comments on commit 27102b3

Please sign in to comment.