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:   Wed, 17 Feb 2021 16:15:39 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Sabyrzhan Tasbolatov <snovitoll@...il.com>
Cc:     jirislaby@...nel.org, linux-kernel@...r.kernel.org,
        syzbot+3d2c27c2b7dc2a94814d@...kaller.appspotmail.com
Subject: Re: [PATCH] tty: fix when iov_iter_count() returns 0 in tty_write()

On Wed, Feb 17, 2021 at 04:13:58PM +0100, Greg KH wrote:
> On Wed, Feb 17, 2021 at 08:43:47PM +0600, Sabyrzhan Tasbolatov wrote:
> > syzbot found WARNING in iov_iter_revert[1] when iov_iter_count() returns 0,
> > therefore INT_MAX is passed to iov_iter_revert() causing > MAX_RW_COUNT
> > warning.
> > 
> > static inline ssize_t do_tty_write()
> > {
> > ..
> > 	size_t count = iov_iter_count(from);
> > ..
> > 		size_t size = count;
> > 		if (ret != size)
> > 			iov_iter_revert(from, size-ret);
> > 
> > [1] WARNING: lib/iov_iter.c:1090
> > Call Trace:
> >  do_tty_write drivers/tty/tty_io.c:967 [inline]
> >  file_tty_write.constprop.0+0x55f/0x8f0 drivers/tty/tty_io.c:1048
> >  call_write_iter include/linux/fs.h:1901 [inline]
> >  new_sync_write+0x426/0x650 fs/read_write.c:518
> >  vfs_write+0x791/0xa30 fs/read_write.c:605
> >  ksys_write+0x12d/0x250 fs/read_write.c:658
> > 
> > Fixes: 494e63ee9c("tty: implement write_iter")
> 
> Nit, you need a ' ' before your '(' character here, otherwise the
> linux-next scripts will complain.

Also, you got the git commit id wrong, so this needs to be fixed up
anyway.  You are pointing to a merge point, I doubt that's what you want
to point to here, right?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ