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>] [day] [month] [year] [list]
Message-ID: <49341335.BT4urmCfm2@maximilian>
Date:	Sun, 06 Oct 2013 21:13:35 +0200
From:	Hans-Frieder Vogt <hfvogt@....net>
To:	zbr@...emap.net, gregkh@...uxfoundation.org
Cc:	linux-kernel@...r.kernel.org
Subject: [PATCH 1/2] w1 - fix fops in w1_bus_notify

Introduce a check to make sure that fops are only called if they have been
defined by the slave module.
Without this check modules like w1_smem cause a NULL pointer
dereference bug.

Signed-off by: Hans-Frieder Vogt <hfvogt@....net>
---
 drivers/w1/w1.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/w1/w1.c	2013-09-24 21:24:20.803261482 +0200
+++ b/drivers/w1/w1.c	2013-10-06 14:58:45.246528318 +0200
@@ -613,6 +613,9 @@ static int w1_bus_notify(struct notifier
 	sl = dev_to_w1_slave(dev);
 	fops = sl->family->fops;
 
+	if (!fops)
+		return 0;
+
 	switch (action) {
 	case BUS_NOTIFY_ADD_DEVICE:
 		/* if the family driver needs to initialize something... */

Hans-Frieder Vogt                       e-mail: hfvogt <at> gmx .dot. net

--
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