summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2016-11-21 16:35:30 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-01-09 08:32:25 +0100
commit173fd37a3d2135fcf17a3240a71ca9c79ae151ab (patch)
treeeacc6e6c43b51f181ed5b7cc1568aeff25043fe5 /scripts
parent630a2ef354bb569e84a874ec59f45f82c6c5ff04 (diff)
target/user: Fix use-after-free of tcmu_cmds if they are expired
commit d0905ca757bc40bd1ebc261a448a521b064777d7 upstream. Don't free the cmd in tcmu_check_expired_cmd, it's still referenced by an entry in our cmd_id->cmd idr. If userspace ever resumes processing, tcmu_handle_completions() will use the now-invalid cmd pointer. Instead, don't free cmd. It will be freed by tcmu_handle_completion() if userspace ever recovers, or tcmu_free_device if not. Reported-by: Bryant G Ly <bgly@us.ibm.com> Tested-by: Bryant G Ly <bgly@us.ibm.com> Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions