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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180222142250.31348-2-rui.silva@linaro.org>
Date:   Thu, 22 Feb 2018 14:22:47 +0000
From:   Rui Miguel Silva <rui.silva@...aro.org>
To:     horia.geanta@....com, aymen.sghaier@....com,
        Herbert Xu <herbert@...dor.apana.org.au>
Cc:     linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        Ryan Harkin <ryan.harkin@...aro.org>,
        Bryan O'Donoghue <pure.logic@...us-software.ie>,
        Rui Miguel Silva <rui.silva@...aro.org>,
        Fabio Estevam <fabio.estevam@....com>,
        Peng Fan <peng.fan@....com>,
        "David S. Miller" <davem@...emloft.net>,
        Lukas Auer <lukas.auer@...ec.fraunhofer.de>,
        stable@...r.kernel.org
Subject: [PATCH v4 1/4] crypto: caam - Fix null dereference at error path

caam_remove already removes the debugfs entry, so we need to remove the one
immediately before calling caam_remove.

This fix a NULL dereference at error paths is caam_probe fail.

Fixes: 67c2315def06 ("crypto: caam - add Queue Interface (QI) backend support")

Tested-by: Ryan Harkin <ryan.harkin@...aro.org>
Cc: "Horia Geantă" <horia.geanta@....com>
Cc: Aymen Sghaier <aymen.sghaier@....com>
Cc: Fabio Estevam <fabio.estevam@....com>
Cc: Peng Fan <peng.fan@....com>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: Lukas Auer <lukas.auer@...ec.fraunhofer.de>
Cc: <stable@...r.kernel.org> # 4.12+
Reviewed-by: Horia Geantă <horia.geanta@....com>
Signed-off-by: Rui Miguel Silva <rui.silva@...aro.org>
---
 drivers/crypto/caam/ctrl.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index e843cf410373..361e750f9cba 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -815,9 +815,6 @@ static int caam_probe(struct platform_device *pdev)
 	return 0;
 
 caam_remove:
-#ifdef CONFIG_DEBUG_FS
-	debugfs_remove_recursive(ctrlpriv->dfs_root);
-#endif
 	caam_remove(pdev);
 	return ret;
 
-- 
2.16.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ