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: <m239fwfk4k.fsf@firstfloor.org>
Date:	Fri, 16 Sep 2011 10:54:35 -0700
From:	Andi Kleen <andi@...stfloor.org>
To:	djwong@...ibm.com
Cc:	"Theodore Ts'o" <tytso@....edu>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: Prevent stack overrun in ext4_file_open when recording last known mountpoint

"Darrick J. Wong" <djwong@...ibm.com> writes:


> Writing stack variables into the superblock doesn't sound like a great idea, so
> use strncpy instead.

This means you can end up with a non 0 terminated path in the
superblock, which could confuse programs.

Better use strlcpy()

strncpy is usually a bad idea, it's semantics overall are quite
bogus and it's also inefficient because it always fills.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only
--
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