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: <0df64efc-85fe-1de7-f15f-233f1e5fdad8@compro.net>
Date:   Wed, 24 Aug 2016 09:34:44 -0400
From:   Mark Hounschell <markh@...pro.net>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-kernel@...r.kernel.org
Cc:     stable@...r.kernel.org, Wim Osterholt <wim@....tudelft.nl>,
        Jiri Kosina <jkosina@...e.cz>, Jens Axboe <axboe@...com>
Subject: Re: [PATCH 4.7 146/186] floppy: fix open(O_ACCMODE) for ioctl-only
 open

On 08/18/2016 09:59 AM, Greg Kroah-Hartman wrote:
> 4.7-stable review patch.  If anyone has any objections, please let me know.
>
> ------------------
>
> From: Jiri Kosina <jkosina@...e.cz>
>
> commit ff06db1efb2ad6db06eb5b99b88a0c15a9cc9b0e upstream.
>
> Commit 09954bad4 ("floppy: refactor open() flags handling"), as a
> side-effect, causes open(/dev/fdX, O_ACCMODE) to fail. It turns out that
> this is being used setfdprm userspace for ioctl-only open().
>
> Reintroduce back the original behavior wrt !(FMODE_READ|FMODE_WRITE)
> modes, while still keeping the original O_NDELAY bug fixed.
>
> Reported-by: Wim Osterholt <wim@....tudelft.nl>
> Tested-by: Wim Osterholt <wim@....tudelft.nl>
> Signed-off-by: Jiri Kosina <jkosina@...e.cz>
> Signed-off-by: Jens Axboe <axboe@...com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>
> ---
>  drivers/block/floppy.c |   21 +++++++++------------
>  1 file changed, 9 insertions(+), 12 deletions(-)
>
> --- a/drivers/block/floppy.c
> +++ b/drivers/block/floppy.c
> @@ -3663,11 +3663,6 @@ static int floppy_open(struct block_devi
>
>  	opened_bdev[drive] = bdev;
>
> -	if (!(mode & (FMODE_READ|FMODE_WRITE))) {
> -		res = -EINVAL;
> -		goto out;
> -	}
> -
>  	res = -ENXIO;
>
>  	if (!floppy_track_buffer) {
> @@ -3711,13 +3706,15 @@ static int floppy_open(struct block_devi
>  	if (UFDCS->rawcmd == 1)
>  		UFDCS->rawcmd = 2;
>
> -	UDRS->last_checked = 0;
> -	clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> -	check_disk_change(bdev);
> -	if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> -		goto out;
> -	if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> -		goto out;
> +	if (mode & (FMODE_READ|FMODE_WRITE)) {
> +		UDRS->last_checked = 0;
> +		clear_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags);
> +		check_disk_change(bdev);
> +		if (test_bit(FD_DISK_CHANGED_BIT, &UDRS->flags))
> +			goto out;
> +		if (test_bit(FD_OPEN_SHOULD_FAIL_BIT, &UDRS->flags))
> +			goto out;
> +	}
>
>  	res = -EROFS;
>
>
>
>

I have a problem with this patch. It only fixes one of the regressions 
caused by the original change to the floppy driver. It does not address 
the user land breakage of removing the NODELAY flag checks.

Thanks
Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ