Skip to content
Snippets Groups Projects
Commit d5c7b42c authored by Dan Carpenter's avatar Dan Carpenter Committed by Greg Kroah-Hartman
Browse files

Drivers: hv: vmbus: Use after free in __vmbus_open()


[ Upstream commit 3e9bf43f ]

The "open_info" variable is added to the &vmbus_connection.chn_msg_list,
but the error handling frees "open_info" without removing it from the
list.  This will result in a use after free.  First remove it from the
list, and then free it.

Fixes: 6f3d791f ("Drivers: hv: vmbus: Fix rescind handling issues")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarAndrea Parri <parri.andrea@gmail.com>
Link: https://lore.kernel.org/r/YHV3XLCot6xBS44r@mwanda


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent b49bdd70
No related branches found
No related tags found
No related merge requests found
...@@ -583,7 +583,7 @@ static int __vmbus_open(struct vmbus_channel *newchannel, ...@@ -583,7 +583,7 @@ static int __vmbus_open(struct vmbus_channel *newchannel,
if (newchannel->rescind) { if (newchannel->rescind) {
err = -ENODEV; err = -ENODEV;
goto error_free_info; goto error_clean_msglist;
} }
err = vmbus_post_msg(open_msg, err = vmbus_post_msg(open_msg,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment