]> git.baikalelectronics.ru Git - kernel.git/commit
cifs: Fix use-after-free in SMB2_write
authorZhangXiaoxu <zhangxiaoxu5@huawei.com>
Sat, 6 Apr 2019 07:47:38 +0000 (15:47 +0800)
committerSteve French <stfrench@microsoft.com>
Tue, 16 Apr 2019 14:38:18 +0000 (09:38 -0500)
commit7925653aed7e41a82ac90cd4333d5938cb264a97
tree6ed3efc4006d230c586e9b2e0fd5f9bdbb6e2166
parent3cf52efc2f983b0b758107c8e3acf0c7dd0e51e4
cifs: Fix use-after-free in SMB2_write

There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196

Should not release the 'req' because it will use in the trace.

Fixes: 313a25ca773e ("smb3: Add ftrace tracepoints for improved SMB3 debugging")
Signed-off-by: ZhangXiaoxu <zhangxiaoxu5@huawei.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org> 4.18+
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
fs/cifs/smb2pdu.c