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

There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_read+0x1136/0x1190
Read of size 8 at addr ffff8880b4e45e50 by task ln/1009

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

Fixes: 4cc2c44d458e ("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