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
..
2022-07-02 18:52:21 +09:00
2022-05-09 16:21:44 -04:00
2022-08-19 13:03:10 +02:00
2022-10-06 17:13:18 -07:00
2022-07-17 17:31:42 -07:00
2022-08-02 12:34:03 -04:00
2022-05-09 16:21:44 -04:00
2022-10-10 19:45:17 -07:00
2022-09-24 07:00:00 +02:00
2022-10-16 15:27:07 -07:00
2022-10-18 11:33:43 -05:00
2022-08-02 12:34:03 -04:00
2022-08-02 12:34:02 -04:00
2022-10-03 20:33:41 -07:00
2022-09-24 15:00:48 +02:00
2022-10-04 13:38:03 -07:00
2022-10-06 17:31:02 -07:00
2022-06-24 20:40:19 +02:00
2022-05-09 16:21:45 -04:00
2022-10-07 09:19:14 -07:00
2022-10-11 17:42:58 -06:00
2022-08-17 17:25:04 -04:00
2022-10-11 17:42:58 -06:00
2022-10-16 15:27:07 -07:00
2022-10-16 15:27:07 -07:00
2022-10-11 17:42:58 -06:00
2022-08-02 12:34:03 -04:00
2022-08-09 14:13:59 +01:00
2022-10-10 19:45:17 -07:00
2022-10-10 20:13:22 -07:00
2022-09-11 21:55:09 -07:00
2022-09-11 21:55:05 -07:00
2022-09-19 22:46:25 +02:00
2022-05-09 16:21:45 -04:00
2022-10-10 19:45:17 -07:00
2022-10-02 11:42:19 -07:00
2022-10-12 11:00:22 -07:00
2022-10-10 17:53:04 -07:00
2022-09-21 10:38:07 +02:00
2022-08-03 10:35:43 -07:00
2022-09-24 13:52:27 +02:00
2022-10-07 08:19:26 -07:00
2022-09-26 14:02:42 -04:00
2022-09-24 07:00:00 +02:00
2022-07-14 10:10:12 +02:00
2022-10-13 09:58:42 -07:00
2022-10-11 17:42:58 -06:00
2022-10-12 11:16:58 -07:00
2022-10-07 08:28:50 -07:00
2022-10-12 11:00:22 -07:00
2022-10-11 17:42:58 -06:00
2022-10-12 11:00:22 -07:00
2022-05-09 16:21:44 -04:00
2022-10-13 09:56:14 -07:00
2022-10-10 19:45:17 -07:00
2022-10-12 11:00:22 -07:00
2022-09-30 08:16:06 -07:00
2022-05-09 16:21:44 -04:00
2022-09-11 21:55:07 -07:00
2022-09-29 15:37:30 +02:00
2022-10-10 19:45:17 -07:00
2022-10-12 11:00:22 -07:00
2022-05-09 16:21:46 -04:00
2022-10-05 01:55:27 -05:00
2022-08-28 14:02:45 -07:00
2022-04-05 15:39:19 +02:00
2022-05-27 11:22:03 -07:00
2022-09-08 17:10:54 -04:00
2022-10-16 15:27:07 -07:00
2022-10-10 19:45:17 -07:00
2022-09-11 20:26:07 -07:00
2022-05-09 16:21:46 -04:00
2022-10-06 17:36:48 -07:00
2022-10-11 17:42:58 -06:00
2022-08-11 13:11:49 -07:00
2022-09-11 21:55:08 -07:00
2022-08-20 11:34:04 -04:00
2022-08-08 10:39:29 -07:00
2022-09-24 07:00:00 +02:00
2022-04-15 14:49:56 -07:00
2022-04-22 10:57:18 -07:00
2022-10-12 11:00:22 -07:00
2022-10-10 17:53:04 -07:00
2022-08-20 11:34:33 -04:00
2022-09-24 18:14:12 -07:00
2022-10-10 19:45:17 -07:00
2022-09-20 08:24:38 -06:00
2022-09-21 10:30:42 -06:00
2022-09-11 21:55:07 -07:00
2022-10-10 17:53:04 -07:00
2022-06-10 16:10:23 -04:00
2022-09-01 17:36:39 -04:00
2022-08-16 10:59:54 -04:00
2022-06-29 13:07:16 +02:00
2022-09-29 23:02:00 -04:00
2022-05-19 23:25:10 -04:00
2022-10-06 16:49:00 -07:00
2022-10-06 17:31:02 -07:00
2022-04-01 19:35:56 -07:00
2022-09-11 20:26:10 -07:00
2022-10-10 14:21:11 -07:00
2022-06-16 19:58:21 -07:00
2022-10-03 14:21:43 -07:00
2022-08-17 15:08:58 -04:00
2022-09-27 07:11:02 -07:00
2022-09-30 23:46:52 -04:00
2022-07-05 16:18:21 -04:00
2022-08-03 10:35:43 -07:00
2022-10-10 19:45:17 -07:00
2022-08-17 11:27:11 +02:00
2022-08-20 11:34:04 -04:00
2022-10-06 17:13:18 -07:00
2022-08-20 11:34:04 -04:00
2022-10-10 17:53:04 -07:00
2022-06-28 13:58:05 -04:00
2022-09-28 14:28:40 -04:00
2022-08-17 17:25:04 -04:00
2022-08-05 16:32:45 -07:00
2022-05-22 21:03:01 +01:00
2022-08-08 22:37:23 -04:00
2022-09-11 19:47:12 -05:00
2022-09-21 20:33:06 -07:00
2022-04-26 13:36:25 -07:00
2022-10-10 17:53:04 -07:00
2022-09-21 12:01:29 +02:00