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: <51AC58BB.20305@asianux.com>
Date:	Mon, 03 Jun 2013 16:50:03 +0800
From:	Chen Gang <gang.chen@...anux.com>
To:	Wang YanQing <udknight@...il.com>,
	"James E.J. Bottomley" <jejb@...isc-linux.org>,
	Helge Deller <deller@....de>,
	Greg KH <gregkh@...uxfoundation.org>,
	Parisc List <linux-parisc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Linux-Arch <linux-arch@...r.kernel.org>
Subject: Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

On 05/30/2013 11:06 PM, Wang YanQing wrote:
> What about add 
> boot_command_line[COMMAND_LINE_SIZE - 1] = '\0';
> to protect the following another strcpy?
> 
> "
> strcpy(command_line, boot_command_line);
> "

If the 'dest' length is not less than COMMAND_LINE_SIZE, the strlcpy()
will copy 'COMMAND_LINE_SIZE - 1' contents, and always set '\0' in the end.

So the next strcpy() will be safe.


Thanks.
-- 
Chen Gang

Asianux Corporation
--
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