netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@zeniv.linux.org.uk>
To: Eric Dumazet <edumazet@google.com>
Cc: syzbot <syzbot+d43608d061e8847ec9f3@syzkaller.appspotmail.com>,
	davem@davemloft.net, jmaloy@redhat.com, kuba@kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	pabeni@redhat.com, syzkaller-bugs@googlegroups.com,
	tipc-discussion@lists.sourceforge.net, ying.xue@windriver.com
Subject: Re: [syzbot] WARNING in _copy_from_iter
Date: Sun, 11 Dec 2022 09:38:54 +0000	[thread overview]
Message-ID: <Y5WlLoCBcHbfKBD5@ZenIV> (raw)
In-Reply-To: <CANn89i+ov7yr_aKNnXdGekZaCT8RW1ijRhPj4BXkKK2hJ0OH3A@mail.gmail.com>

On Thu, Dec 08, 2022 at 08:38:14PM +0100, Eric Dumazet wrote:

> Exposes an old bug in tipc ?
> 
> Seems a new check added by Al in :
> 
> Author: Al Viro <viro@zeniv.linux.org.uk>
> Date:   Thu Sep 15 20:11:15 2022 -0400
> 
>     iov_iter: saner checks for attempt to copy to/from iterator
> 
>     instead of "don't do it to ITER_PIPE" check for ->data_source being
>     false on copying from iterator.  Check for !->data_source for
>     copying to iterator, while we are at it.
> 
>     Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Lovely...  zero-length sendmsg with uninitialized ->msg_data...

	I would probably argue that it's a bug in tipc_connect(),
fixed by iov_iter_kvec(&m.msg_iter, ITER_SOURCE, NULL, 0, 0);
in there.  Depends - if that kind of uninitialized msg_iter used
as zero length source or zero length destination is a frequent pattern,
might as well make zero-byte copy_...iter() succeed quietly;
I hope it isn't, but that's definitely something I'd missed
when doing that series.

	I'll take a look tomorrow^Win the morning, after I get
some sleep...

      reply	other threads:[~2022-12-11  9:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-08 19:36 [syzbot] WARNING in _copy_from_iter syzbot
2022-12-08 19:38 ` Eric Dumazet
2022-12-11  9:38   ` Al Viro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y5WlLoCBcHbfKBD5@ZenIV \
    --to=viro@zeniv.linux.org.uk \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jmaloy@redhat.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=syzbot+d43608d061e8847ec9f3@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=ying.xue@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).