提交 3a5c19c2 编写于 作者: J James Bottomley

[SCSI] fix use-after-free in scsi_init_io()

we're using a pointer through a freed command to reset the request,
which has shown up as an oops with slab poisoning:
Reported-by: NTejun Heo <tj@kernel.org>
Reported-by: NAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
上级 7e443312
...@@ -1011,8 +1011,8 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask) ...@@ -1011,8 +1011,8 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask)
err_exit: err_exit:
scsi_release_buffers(cmd); scsi_release_buffers(cmd);
scsi_put_command(cmd);
cmd->request->special = NULL; cmd->request->special = NULL;
scsi_put_command(cmd);
return error; return error;
} }
EXPORT_SYMBOL(scsi_init_io); EXPORT_SYMBOL(scsi_init_io);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册