Commit 86163b9
smb: client: fix oops due to uninitialised var in smb2_unlink()
commit 048efe1 upstream.
If SMB2_open_init() or SMB2_close_init() fails (e.g. reconnect), the
iovs set @Rqst will be left uninitialised, hence calling
SMB2_open_free(), SMB2_close_free() or smb2_set_related() on them will
oops.
Fix this by initialising @close_iov and @open_iov before setting them
in @Rqst.
Reported-by: Thiago Becker <tbecker@redhat.com>
Fixes: 1cf9f2a ("smb: client: handle unlink(2) of files open by different clients")
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: David Howells <dhowells@redhat.com>
Cc: linux-cifs@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 2ef0fc3 commit 86163b9
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1205 | 1205 | | |
1206 | 1206 | | |
1207 | 1207 | | |
| 1208 | + | |
1208 | 1209 | | |
1209 | 1210 | | |
1210 | 1211 | | |
| |||
1229 | 1230 | | |
1230 | 1231 | | |
1231 | 1232 | | |
| 1233 | + | |
1232 | 1234 | | |
1233 | 1235 | | |
1234 | 1236 | | |
1235 | 1237 | | |
1236 | 1238 | | |
1237 | | - | |
1238 | 1239 | | |
1239 | 1240 | | |
| 1241 | + | |
1240 | 1242 | | |
1241 | 1243 | | |
1242 | 1244 | | |
| |||
0 commit comments