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  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]
Date:   Wed, 30 Aug 2017 16:37:04 +0100
From:   Al Viro <>
To:     Christoph Hellwig <>
Subject: Re: [PATCH 05/16] fs: fix kernel_read prototype

On Wed, Aug 30, 2017 at 04:59:56PM +0200, Christoph Hellwig wrote:
> Use proper ssize_t and size_t types for the return value and count
> argument,  move the offset last and make it an in/out argument like
> all other read/write helpers.

Might be better to switch the third argument to void * at the same time
and lose those casts.

>  			if (p)
>  				memcpy(p + offset, buf, n);
> -
> -			offset += n;

Almost certainly broken - in effect, you've taken the update of offset
several lines prior, so that memcpy() is getting the wrong first argument.
The same needs to be watched out for in other similar places.

Powered by blists - more mailing lists