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: <30210ed77b40b4b6629de659cb56b9ec7832c447.1744452787.git.dan.carpenter@linaro.org>
Date: Sat, 12 Apr 2025 13:15:00 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Koichiro Den <koichiro.den@...onical.com>
Cc: Geert Uytterhoeven <geert+renesas@...der.be>,
	Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>, linux-gpio@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [PATCH 1/5] gpio: aggregator: fix "_sysfs" prefix check in
 gpio_aggregator_make_group()

This code is intended to reject strings that start with "_sysfs" but the
strcmp() limit is wrong so checks the whole string instead of the prefix.

Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs")
Signed-off-by: Dan Carpenter <dan.carpenter@...aro.org>
---
 drivers/gpio/gpio-aggregator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-aggregator.c b/drivers/gpio/gpio-aggregator.c
index dde969f29ee2..b4c9e373a6ec 100644
--- a/drivers/gpio/gpio-aggregator.c
+++ b/drivers/gpio/gpio-aggregator.c
@@ -1016,7 +1016,7 @@ gpio_aggregator_make_group(struct config_group *group, const char *name)
 	 * for devices create via legacy sysfs interface.
 	 */
 	if (strncmp(name, AGGREGATOR_LEGACY_PREFIX,
-		    sizeof(AGGREGATOR_LEGACY_PREFIX)) == 0)
+		    sizeof(AGGREGATOR_LEGACY_PREFIX) - 1) == 0)
 		return ERR_PTR(-EINVAL);
 
 	/* arg space is unneeded */
-- 
2.47.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ