Zhang Xiaoxu
30b2d7f8f1
cifs: Fix memory leak when build ntlmssp negotiate blob failed
...
There is a memory leak when mount cifs:
unreferenced object 0xffff888166059600 (size 448):
comm "mount.cifs", pid 51391, jiffies 4295596373 (age 330.596s)
hex dump (first 32 bytes):
fe 53 4d 42 40 00 00 00 00 00 00 00 01 00 82 00 .SMB@...........
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
backtrace:
[<0000000060609a61>] mempool_alloc+0xe1/0x260
[<00000000adfa6c63>] cifs_small_buf_get+0x24/0x60
[<00000000ebb404c7>] __smb2_plain_req_init+0x32/0x460
[<00000000bcf875b4>] SMB2_sess_alloc_buffer+0xa4/0x3f0
[<00000000753a2987>] SMB2_sess_auth_rawntlmssp_negotiate+0xf5/0x480
[<00000000f0c1f4f9>] SMB2_sess_setup+0x253/0x410
[<00000000a8b83303>] cifs_setup_session+0x18f/0x4c0
[<00000000854bd16d>] cifs_get_smb_ses+0xae7/0x13c0
[<000000006cbc43d9>] mount_get_conns+0x7a/0x730
[<000000005922d816>] cifs_mount+0x103/0xd10
[<00000000e33def3b>] cifs_smb3_do_mount+0x1dd/0xc90
[<0000000078034979>] smb3_get_tree+0x1d5/0x300
[<000000004371f980>] vfs_get_tree+0x41/0xf0
[<00000000b670d8a7>] path_mount+0x9b3/0xdd0
[<000000005e839a7d>] __x64_sys_mount+0x190/0x1d0
[<000000009404c3b9>] do_syscall_64+0x35/0x80
When build ntlmssp negotiate blob failed, the session setup request
should be freed.
Fixes: 49bd49f983b5 ("cifs: send workstation name during ntlmssp session setup")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Reviewed-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Zhang Xiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-10-18 11:33:43 -05:00
..
2021-06-20 21:28:17 -05:00
2022-10-18 11:33:43 -05:00
2022-10-13 09:36:39 -05:00
2022-10-05 01:31:18 -05:00
2022-10-05 01:31:18 -05:00
2021-11-10 16:30:13 -06:00
2021-11-10 16:30:13 -06:00
2022-10-15 10:05:53 -05:00
2021-06-20 21:28:17 -05:00
2022-01-02 20:38:46 -06:00
2022-01-02 20:38:46 -06:00
2022-10-05 01:31:18 -05:00
2021-04-25 16:28:22 -05:00
2021-09-13 14:51:10 -05:00
2019-05-30 11:26:35 -07:00
2019-05-30 11:26:35 -07:00
2022-08-05 11:24:03 -05:00
2021-09-13 14:51:10 -05:00
2022-10-07 23:08:39 -05:00
2022-10-18 11:33:43 -05:00
2022-09-14 04:00:06 -05:00
2022-10-15 10:05:53 -05:00
2022-10-05 17:42:38 -05:00
2022-10-13 09:36:04 -05:00
2022-08-19 11:02:26 -05:00
2022-10-13 09:36:39 -05:00
2022-10-13 09:36:39 -05:00
2022-10-05 01:31:18 -05:00
2021-07-22 11:43:23 -05:00
2022-10-18 11:33:43 -05:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2021-09-13 14:51:10 -05:00
2022-10-18 11:33:43 -05:00
2022-10-07 23:06:48 -05:00
2022-08-11 20:03:04 -05:00
2022-10-05 01:31:18 -05:00
2022-08-10 21:26:08 -05:00
2022-10-18 11:33:43 -05:00
2022-10-15 10:05:53 -05:00
2022-01-19 11:21:08 -06:00
2022-10-13 09:36:04 -05:00
2022-08-11 10:33:18 -05:00
2022-10-07 23:08:39 -05:00
2022-08-29 12:47:15 +01:00
2020-12-14 09:16:22 -06:00
2022-08-17 18:07:13 -05:00
2019-05-24 17:36:45 +02:00
2019-05-24 17:36:45 +02:00
2022-02-17 07:00:39 -06:00
2022-10-13 09:36:04 -05:00
2021-09-13 14:51:10 -05:00
2022-10-18 11:33:43 -05:00
2022-10-13 09:36:04 -05:00
2022-10-14 12:35:25 -05:00
2022-03-26 23:09:20 -05:00
2022-10-13 09:36:38 -05:00
2021-11-05 09:50:57 -05:00
2022-10-13 09:36:39 -05:00
2022-10-15 10:05:53 -05:00
2022-10-18 11:33:43 -05:00
2022-10-13 09:36:04 -05:00
2022-10-15 10:05:53 -05:00
2021-09-13 14:51:10 -05:00
2022-10-07 23:08:41 -05:00
2022-10-05 01:31:04 -05:00
2022-10-05 01:29:21 -05:00
2021-09-08 23:59:26 -05:00
2021-09-13 14:51:10 -05:00
2019-01-24 09:37:33 -06:00
2022-10-05 01:31:18 -05:00
2022-10-10 09:10:28 -07:00
2021-04-25 16:28:23 -05:00
2021-09-13 14:51:10 -05:00
2022-08-05 11:24:03 -05:00