Revert "cifs: fix memory leak in SMB2_read"
commitddbe4b02aeca52900bb6965c533044b59924e37c
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 May 2019 08:47:04 +0000 (23 10:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 25 May 2019 16:25:19 +0000 (25 18:25 +0200)
tree73fef6d6da7bc4177c09ac5af6a63c15b95836cf
parentc65f75512cad37a5ae1936344296869b69d6109f
Revert "cifs: fix memory leak in SMB2_read"

This reverts commit c54a881d793e3eea2a1b1460c5778b22128821ea which is
commit 05fd5c2c61732152a6bddc318aae62d7e436629b upstream.

Lars writes:
This patch should not be in 4.14-stable because
088aaf17aa79300cab14dbee2569c58cfafd7d6e was for 4.18+.

Now we have a double-free crash in SMB2_read because there are 2
calls to cifs_small_buf_release in the error path.

It was a mistake to backport it this far, so let's revert it.

Reported-by: Lars Persson <lists@bofh.nu>
Cc: Ronnie Sahlberg <lsahlber@redhat.com>
Cc: Pavel Shilovsky <pshilov@microsoft.com>
Cc: Steve French <stfrench@microsoft.com>
Cc: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/cifs/smb2pdu.c