lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1464106324-25005-1-git-send-email-sudeep.holla@arm.com> Date: Tue, 24 May 2016 17:12:04 +0100 From: Sudeep Holla <sudeep.holla@....com> To: Lee Jones <lee.jones@...aro.org>, Jassi Brar <jaswinder.singh@...aro.org> Cc: linux-kernel@...r.kernel.org, Sudeep Holla <sudeep.holla@....com>, Jassi Brar <jassisinghbrar@...il.com> Subject: [PATCH] mailbox: mailbox-test: set tdev->signal to NULL after freeing tdev->signal is not set NULL after it's freed. This will cause random exceptions when the stale pointer is accessed after tdev->signal is freed. Also, since tdev->signal allocation is skipped the next time it's written, this leads to continuous fault finally leading to the total death of the system. Cc: Lee Jones <lee.jones@...aro.org> Cc: Jassi Brar <jassisinghbrar@...il.com> Fixes: d1c2f87c9a8f ("mailbox: mailbox-test: Prevent memory leak") Signed-off-by: Sudeep Holla <sudeep.holla@....com> --- drivers/mailbox/mailbox-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mailbox/mailbox-test.c b/drivers/mailbox/mailbox-test.c index 58d04726cdd7..9ca96e9db6bf 100644 --- a/drivers/mailbox/mailbox-test.c +++ b/drivers/mailbox/mailbox-test.c @@ -133,6 +133,7 @@ static ssize_t mbox_test_message_write(struct file *filp, out: kfree(tdev->signal); kfree(tdev->message); + tdev->signal = NULL; return ret < 0 ? ret : count; } -- 1.9.1
Powered by blists - more mailing lists