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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Fri, 16 Sep 2022 18:53:48 -0700
From:   Li Zhong <floridsleeves@...il.com>
To:     linux-kernel@...r.kernel.org
Cc:     tglx@...utronix.de, Li Zhong <floridsleeves@...il.com>
Subject: [PATCH v1] kernel/irq/manage: check return value of irq_data_get_irq_chip()

Check the return value chip of irq_data_get_irq_chip(), which could be
NULL and result in null pointer dereference if unchecked.

Signed-off-by: Li Zhong <floridsleeves@...il.com>
---
 kernel/irq/manage.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 40fe7806cc8c..1f967050338b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -202,6 +202,8 @@ static void irq_validate_effective_affinity(struct irq_data *data)
 
 	if (!cpumask_empty(m))
 		return;
+	if (!chip)
+		return;
 	pr_warn_once("irq_chip %s did not update eff. affinity mask of irq %u\n",
 		     chip->name, data->irq);
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ