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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0911161312140.12810@bicker>
Date:	Wed, 18 Nov 2009 10:30:14 +0200 (SAST)
From:	Dan Carpenter <error27@...il.com>
To:	balajirrao@...nmoko.org
cc:	rtc-linux@...glegroups.com, linux-kernel@...r.kernel.org
Subject: [patch] rtc: use after free in pcf50633_rtc_probe()

"rtc" is freed and then dereferenced on the next line.  This patch fixes 
that.

This is a resend.  I have been offline for the last few months so I may 
have missed a reply or something.  Not sure what the status was.

regards,
dan carpenter

Signed-off-by: Dan Carpenter <error27@...il.com>

--- orig/drivers/rtc/rtc-pcf50633.c	2009-07-17 16:21:52.000000000 +0300
+++ new/drivers/rtc/rtc-pcf50633.c	2009-07-17 16:22:56.000000000 +0300
@@ -291,8 +291,9 @@
 				&pcf50633_rtc_ops, THIS_MODULE);
 
 	if (IS_ERR(rtc->rtc_dev)) {
+		int ret =  PTR_ERR(rtc->rtc_dev);
 		kfree(rtc);
-		return PTR_ERR(rtc->rtc_dev);
+		return ret;
 	}
 
 	pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ