This is a note to let you know that I've just added the patch titled
NFC: pn533: Fix use after free
to the 3.6-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
nfc-pn533-fix-use-after-free.patch
and it can be found in the queue-3.6 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 770f750bc2b8312489c8e45306f551d08a319d3c Mon Sep 17 00:00:00 2001
From: Szymon Janc <[email protected]>
Date: Mon, 29 Oct 2012 14:04:43 +0100
Subject: NFC: pn533: Fix use after free
From: Szymon Janc <[email protected]>
commit 770f750bc2b8312489c8e45306f551d08a319d3c upstream.
cmd was freed in pn533_dep_link_up regardless of
pn533_send_cmd_frame_async return code. Cmd is passed as argument to
pn533_in_dep_link_up_complete callback and should be freed there.
Signed-off-by: Szymon Janc <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Signed-off-by: Peter Huewe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/nfc/pn533.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
--- a/drivers/nfc/pn533.c
+++ b/drivers/nfc/pn533.c
@@ -1759,12 +1759,8 @@ static int pn533_dep_link_up(struct nfc_
rc = pn533_send_cmd_frame_async(dev, dev->out_frame, dev->in_frame,
dev->in_maxlen, pn533_in_dep_link_up_complete,
cmd, GFP_KERNEL);
- if (rc)
- goto out;
-
-
-out:
- kfree(cmd);
+ if (rc < 0)
+ kfree(cmd);
return rc;
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.6/nfc-pn533-fix-use-after-free.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html