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]
Date:   Thu, 17 Aug 2017 14:45:49 +0100
From:   Luis Henriques <lhenriques@...e.com>
To:     "Yan\, Zheng" <zyan@...hat.com>
Cc:     Sage Weil <sage@...hat.com>, Ilya Dryomov <idryomov@...il.com>,
        ceph-devel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ceph: check negative offsets on ceph_llseek()

Luis Henriques <lhenriques@...e.com> writes:

> When a user requests SEEK_HOLE or SEEK_DATA with a negative offset
> ceph_llseek should return -ENXIO.  Currently -EINVAL is being returned for
> SEEK_DATA and 0 for SEEK_HOLE.

Ping

This patch should make xfstest generic/448 happy.

Cheers,
-- 
Luís

>
> Signed-off-by: Luis Henriques <lhenriques@...e.com>
> ---
>  fs/ceph/file.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ceph/file.c b/fs/ceph/file.c
> index 3d48c415f3cb..e1912e67843f 100644
> --- a/fs/ceph/file.c
> +++ b/fs/ceph/file.c
> @@ -1481,13 +1481,13 @@ static loff_t ceph_llseek(struct file *file, loff_t offset, int whence)
>  		offset += file->f_pos;
>  		break;
>  	case SEEK_DATA:
> -		if (offset >= i_size) {
> +		if (offset < 0 || offset >= i_size) {
>  			ret = -ENXIO;
>  			goto out;
>  		}
>  		break;
>  	case SEEK_HOLE:
> -		if (offset >= i_size) {
> +		if (offset < 0 || offset >= i_size) {
>  			ret = -ENXIO;
>  			goto out;
>  		}
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ