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: <cca18f9c630a41c18487729770b492bb@terma.com>
Date: Thu, 21 Mar 2024 13:08:59 +0000
From: Claus Hansen Ries <chr@...ma.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>, "edumazet@...gle.com"
	<edumazet@...gle.com>, "kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>, "michal.simek@....com"
	<michal.simek@....com>, "wei.fang@....com" <wei.fang@....com>,
	"yangyingliang@...wei.com" <yangyingliang@...wei.com>, "robh@...nel.org"
	<robh@...nel.org>, "harini.katakam@....com" <harini.katakam@....com>,
	"dan.carpenter@...aro.org" <dan.carpenter@...aro.org>,
	"u.kleine-koenig@...gutronix.de" <u.kleine-koenig@...gutronix.de>,
	"wanghai38@...wei.com" <wanghai38@...wei.com>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Simon Horman <horms@...nel.org>
Subject: [PATCH net v3] net: ll_temac: platform_get_resource replaced by wrong
 function

The function platform_get_resource was replaced with 
devm_platform_ioremap_resource_byname and is called using 0 as name. 

This eventually ends up in platform_get_resource_byname in the call 
stack, where it causes a null pointer in strcmp.

	if (type == resource_type(r) && !strcmp(r->name, name))

It should have been replaced with devm_platform_ioremap_resource.

Fixes: bd69058f50d5 ("net: ll_temac: Use devm_platform_ioremap_resource_byname()")
Signed-off-by: Claus Hansen Ries <chr@...ma.com>
Cc: stable@...r.kernel.org
Reviewed-by: Simon Horman <horms@...nel.org>
---
v3:
  - Cleanup of patch message
v2: https://marc.info/?l=linux-netdev&m=171094427802626&w=2
  - fix accidently converting tabs to spaces and wording in commit message
v1: https://marc.info/?l=linux-netdev&m=171087828129633&w=2

 drivers/net/ethernet/xilinx/ll_temac_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c
index 9df39cf8b097..1072e2210aed 100644
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1443,7 +1443,7 @@ static int temac_probe(struct platform_device *pdev)
 	}
 
 	/* map device registers */
-	lp->regs = devm_platform_ioremap_resource_byname(pdev, 0);
+	lp->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(lp->regs)) {
 		dev_err(&pdev->dev, "could not map TEMAC registers\n");
 		return -ENOMEM;

base-commit: d95fcdf4961d27a3d17e5c7728367197adc89b8d
-- 
2.39.3 (Apple Git-146)




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ