Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5216053rwb; Sun, 11 Dec 2022 02:02:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf6LEy6C26TcKiSPrExySoFWAdqNDKZtilK+pZVP+cEA7G9qUxFHEeRltwjAasjmB4g2ur92 X-Received: by 2002:a17:907:a681:b0:7ba:9b49:53d4 with SMTP id vv1-20020a170907a68100b007ba9b4953d4mr9932438ejc.71.1670752972276; Sun, 11 Dec 2022 02:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670752972; cv=none; d=google.com; s=arc-20160816; b=IBO9hPyLsxJTS/KOMO39cMwi+nXALbakuQonKSMBGoWiObr5RiVvUpS7JktoaXDJZV aAK6UFfWnjl55mgvEL92bFsFYeszQPZAtvLnM0JxXviMhlIvZLI2Bi+j8Jgn5v/a1uNy klIpHSJgP6Tr8ILC+IKPTtW8zrk07PiEPBeJR0IpXWbSi+KGhPHJmGc8XyJ2GHUVNnpF vDqg79i4iY8JnkiTbCAHznz21wyyjmtLM4FrWw9pq27prLNhtzP7AoP9rvcoPT5zkmmY do+strFXiRYgShj5qgtLAmIBrs4GAkIM3aC+q4+LbdFHWFYpSj4yjnhMYcoj8MQ1JfG6 G6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=b8eECkmSUe5QTUW/M80U06khZU8RQ+xH7KebZuSN7LU=; b=JC2QjAuen0/WFvnX+oOfWzucNVMNoW2GULp5zDuddBzm6zUPt4MloDScuoN6soFHO2 lrcRTBINJf63mcUYMagxcfEfTGwgFzPkiXDi3ulL+XcGhpM3EWbgs52oPX4TCIgvPyWi T50td2gmwXFrBgpqm2shgDhFzMJa3H57kb/KK6xMRTDz4HEXkA+799Clt8LCg/th5NaN OQhfa7w1DoLNWB8VqkGem2ObWmaiTN/JBV4mLrSE+z4DSb4PkWpC6gI2+fgZIephlQt0 N3uTHzfwq+1WltA4D73ylBhdFBL3/ftn0MImeRLK5NEWgoZgUakCxI0T/7kBKmcgANEF KuZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=NsLBxfw6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020aa7d303000000b0046cf631a74dsi4778455edq.200.2022.12.11.02.02.33; Sun, 11 Dec 2022 02:02:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.org.uk header.s=zeniv-20220401 header.b=NsLBxfw6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zeniv.linux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbiLKJjK (ORCPT + 75 others); Sun, 11 Dec 2022 04:39:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33964 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiLKJjH (ORCPT ); Sun, 11 Dec 2022 04:39:07 -0500 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 148DB63B0; Sun, 11 Dec 2022 01:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=b8eECkmSUe5QTUW/M80U06khZU8RQ+xH7KebZuSN7LU=; b=NsLBxfw6ojIVZnnZslmW2n5RAG h8qGPxAooBg/HjQIkxs20LTzfOySQXS9qAANRH+2U4M4ADsCZy7RaQIpEPNRzcLHSzYkErTYr9N+l wAR+Ks5rUgLx5wDQjilDgOzx5ULVuF89RlFb1EmpoKkb2V7toprHQFBFzmI27jkZ5HbD0xul0zuDJ 3J8+RUDjk+sa4lqM8iSJLk1M0ozwa7FXXu7Dusj7RQ03AOlRiIfPOM8f83uuSNo3heO2IahL7msh3 LLKBPsmexM8uZix2U0o60Wpnp3Xif0bvVfRrz7buHI9q7pyDfq06ABc7gpY6oTSMt8BsRlOWzDmvy bJ3il9MQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1p4InO-00B0H9-1q; Sun, 11 Dec 2022 09:38:54 +0000 Date: Sun, 11 Dec 2022 09:38:54 +0000 From: Al Viro To: Eric Dumazet Cc: syzbot , 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 Message-ID: References: <000000000000bc5b5a05ef56276d@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 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...