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: <988aec06-2127-3120-47a4-5d0131f59a61@hpe.com>
Date:   Wed, 8 Nov 2017 11:06:03 -0600
From:   Andrew Banman <abanman@....com>
To:     Corey Minyard <minyard@....org>
CC:     Dimitri Sivanich <sivanich@....com>,
        "Anderson, Russ" <russ.anderson@....com>,
        Mike Travis <mike.travis@....com>,
        <openipmi-developer@...ts.sourceforge.net>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH] drivers/char/ipmi_si: prevent null deref during module exit

If there are uninitialized SMIs in the smi_infos list, i.e. with no
handlers set, then disable_si_irq() in cleanup_smi_one() will hit a null
pointer dereference when the former attempts to start the check enables
transaction. Thus, we panic during module exit.

Avoid panicking when there are uninitialized SMIs by checking for a handler
pointer before starting the check enables transaction.

Signed-off-by: Andrew Banman <abanman@....com>
---
  drivers/char/ipmi/ipmi_si_intf.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index cb5719e..6c0b1b3 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -442,7 +442,7 @@ static void start_check_enables(struct smi_info *smi_info, 
bool start_timer)

  	if (start_timer)
  		start_new_msg(smi_info, msg, 2);
-	else
+	else if (smi_info->handlers)
  		smi_info->handlers->start_transaction(smi_info->si_sm, msg, 2);
  	smi_info->si_state = SI_CHECKING_ENABLES;
  }
-- 
1.8.2.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ