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] [day] [month] [year] [list]
Date:	Thu, 6 Aug 2015 09:57:59 -0400
From:	Tejun Heo <tj@...nel.org>
To:	NeilBrown <neilb@...e.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] sysfs: correctly handle short reads on PREALLOC attrs.

On Thu, Aug 06, 2015 at 08:27:55AM +1000, NeilBrown wrote:
> 
> 
> attributes declared with __ATTR_PREALLOC use sysfs_kf_read()
> which ignores the 'count' arg.
> So a 1-byte read request can return more bytes than that.
> 
> This is seen with the 'dash' shell when 'read' is used on
> some 'md' sysfs attributes.
> 
> So only return the 'min' of count and the attribute length.
> 
> Signed-off-by: NeilBrown <neilb@...e.com>

Acked-by: Tejun Heo <tj@...nel.org>

Thanks.

-- 
tejun
--
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