Commit 14498ff
smb: client: fix double-free in SMB2_open() replay
commit b55e182 upstream.
A response-bearing attempt can return a replayable error and free its
response buffer. If SMB2_open_init() fails before the next send, cleanup
retains the previous buffer type and frees that response again.
Reset response bookkeeping before each attempt to prevent the stale free.
Fixes: 4f1fffa ("cifs: commands that are retried should have replay flag set")
Cc: stable@vger.kernel.org
Signed-off-by: Henrique Carvalho <henrique.carvalho@suse.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3407240 commit 14498ff
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3205 | 3205 | | |
3206 | 3206 | | |
3207 | 3207 | | |
| 3208 | + | |
| 3209 | + | |
3208 | 3210 | | |
3209 | 3211 | | |
3210 | 3212 | | |
| |||
0 commit comments