xenbus_xs.c: use-after-free
The Coverity checker spotted the following use-after-free in drivers/xen/xenbus/xenbus_xs.c:
<-- snip -->
...
static int process_msg(void)
{
...
if (IS_ERR(msg->u.watch.vec)) {
kfree(msg);
err = PTR_ERR(msg->u.watch.vec);...
<-- snip -->
cu
Adrian
Signature · 4 lines
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon SeedPATCH 1/1 xenbus_xs.c: fix a use-after-free
This patch fixes an obvious use-after-free spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
---
drivers/xen/xenbus/xenbus_xs.c renamed from drivers/xen/xenbus/xenbus_xs.c.old +1 -1
@@ -782,8 +782,8 @@ static int process_msg(void) msg->u.watch.vec =split (body, msg->hdr.len, &msg->u.watch.vec_size);if (IS_ERR (msg->u.watch.vec)) { -kfree (msg); err =PTR_ERR (msg->u.watch.vec); +kfree (msg); goto out; }
Re: [2.6.23 patch] xenbus_xs.c: fix a use-after-free
Quoted 4 lines · Adrian Bunk
This patch fixes an obvious use-after-free spotted by the Coverity checker.
Signed-off-by Adrian Bunk <[email protected]>
OK, thanks.
J