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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 21 Mar 2012 16:18:51 +0100
From:	Jean Delvare <khali@...ux-fr.org>
To:	Eric Paris <eparis@...isplace.org>
Cc:	Amit Daniel Kachhap <amit.kachhap@...aro.org>,
	linux-pm@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
	linux-acpi@...r.kernel.org, lenb@...nel.org,
	linaro-dev@...ts.linaro.org, patches@...aro.org
Subject: Re: [PATCH] thermal: Fix for setting the thermal zone mode to
 enable/disable

Hi Eric,

On Wed, 21 Mar 2012 10:47:52 -0400, Eric Paris wrote:
> On Wed, Mar 21, 2012 at 10:13 AM, Jean Delvare <khali@...ux-fr.org> wrote:
> > Note that a quick grep suggests that drivers/misc/ad525x_dpot.c,
> > security/selinux/hooks.c and arch/m68k/sun3/prom/console.c suffer from
> > the same issue, if you want to fix them too.
> 
> I do see that we use sizeof() for strings in the selinux code, but I
> don't see a place that it is a bug.  If you see a bug let me know and
> I'd be happy to fix it!

My suspect is in sb_finish_set_opts():

	if (strncmp(sb->s_type->name, "sysfs", sizeof("sysfs")) == 0)

If sb->s_type->name is exactly "sysfs", it will work, but if it only
starts with "sysfs" it won't. And if only exact matches are expected,
then strncmp is overkill and strcmp should be used instead.

Note that I don't know anything about the code so I might as well be
totally wrong.

-- 
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ