Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5120215imm; Tue, 19 Jun 2018 05:29:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIv4Fx7Wy9+adqEeodBCTCnICF9/nrCAJ+JDu485Dk31lPkpSU1zYty9YJKX+l9sSNZgjdt X-Received: by 2002:a17:902:3281:: with SMTP id z1-v6mr18890595plb.226.1529411383917; Tue, 19 Jun 2018 05:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529411383; cv=none; d=google.com; s=arc-20160816; b=MByZS7F4NxJvWLHTcR82mJHrYcXcC9MJU2uhdLc2PagyAHFGLY+VA3yVPqjOsbHx0y iTd+0R7i5LdERMT8uOlc1CVTKqQwe7+x+NtTqM2FvzQ80ZZ0mCgASc4ZDNDb1XkA9Mr8 f75BGNak0fRFpiRxCWwUx63OdOaqVKn3T95DzQzRliQndB41xBPI3jmkzkAMmvGMTclZ +DW5sbNd3zLkMgwfVBowtDNdMpWz+DxFv2MegQX9sk6QfC7gXmgoo9xvm0utHxLsxnFe ClvpxDQF4uis6bxPm0TbQiUKfjvvR4+dHbrZWHaCQR1ZZjZ5C+faSpwVzm6mUuyUzyX/ DATw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=U42f88f5f5l0SgtId0DqBon/LxpOuI08X+1Lk3oDkrQ=; b=aKMXbRzlwyfFMBe3TXK0eMhC7WW/6ve2j48gRhqY4Ww326ZqgDH7VCsCA7TPWis2DW xtVVaXfvztp9vtijWB3wwTH7I+o5TvxuwG8V+0DHPZPh+PX1ZGUzgSTxmZGCuFJsCvc9 w4Ks9qAyvBIvpDUd4ZSa6wkLPXLlPIedrpNGkvV0SiL5gZhLKJ8XWWI5smndTl208f/b 8m8KSADXLT0zToZe4nCzoLgrjgysy/iePFLvduSt0DyVs4xsn1owDf3sSxvSuYzb5Cge 98jGbENZRlcpIgHXi0+JACj66fORwpKDEBaLhqUxG6ILfxKAw5eDEj8IL8xBFNVPD4ic +ddw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a186-v6si14168218pgc.453.2018.06.19.05.29.22; Tue, 19 Jun 2018 05:29:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966111AbeFSM2h (ORCPT + 99 others); Tue, 19 Jun 2018 08:28:37 -0400 Received: from a.mx.secunet.com ([62.96.220.36]:60722 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964997AbeFSM2g (ORCPT ); Tue, 19 Jun 2018 08:28:36 -0400 Received: from localhost (localhost [127.0.0.1]) by a.mx.secunet.com (Postfix) with ESMTP id 87E9E200A3; Tue, 19 Jun 2018 14:28:34 +0200 (CEST) X-Virus-Scanned: by secunet Received: from a.mx.secunet.com ([127.0.0.1]) by localhost (a.mx.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OyN4YwYb6K0w; Tue, 19 Jun 2018 14:28:33 +0200 (CEST) Received: from mail-essen-01.secunet.de (mail-essen-01.secunet.de [10.53.40.204]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a.mx.secunet.com (Postfix) with ESMTPS id 4801C201C7; Tue, 19 Jun 2018 14:28:33 +0200 (CEST) Received: from gauss2.secunet.de (10.182.7.193) by mail-essen-01.secunet.de (10.53.40.204) with Microsoft SMTP Server id 14.3.399.0; Tue, 19 Jun 2018 14:28:32 +0200 Received: by gauss2.secunet.de (Postfix, from userid 1000) id E0C2631822FA; Tue, 19 Jun 2018 14:28:32 +0200 (CEST) Date: Tue, 19 Jun 2018 14:28:32 +0200 From: Steffen Klassert To: Dmitry Vyukov CC: Jason Litzinger , David Miller , Herbert Xu , LKML , netdev , syzkaller-bugs Subject: Re: WARNING in xfrm_state_fini (2) Message-ID: <20180619122832.onqlgn5wqby7ahcu@gauss3.secunet.de> References: <001a114387b624fb2e0564614477@google.com> <001a113f64eedee31b05662594bc@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) X-G-Data-MailSecurity-for-Exchange-State: 0 X-G-Data-MailSecurity-for-Exchange-Error: 0 X-G-Data-MailSecurity-for-Exchange-Sender: 23 X-G-Data-MailSecurity-for-Exchange-Server: d65e63f7-5c15-413f-8f63-c0d707471c93 X-EXCLAIMER-MD-CONFIG: 2c86f778-e09b-4440-8b15-867914633a10 X-G-Data-MailSecurity-for-Exchange-Guid: 725C9183-93DD-4558-B3C5-2357636311E1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 18, 2018 at 09:25:31AM +0200, Dmitry Vyukov wrote: > On Mon, Jun 18, 2018 at 6:14 AM, Jason Litzinger > wrote: > > I've simplified the reproducer provided by syzbot to the included > > version. The warning is reproduced 100% using the qemu image in the > > syzkaller docs running the latest upstream and net. > > > > As noted on the dashboard, this is similar to [1], in that an entry > > remains in the xfrm_state_walk list, but different because the > > protocol is not 0, it is 43, IPPROTO_ROUTING (and is valid by the fix > > for [1], see 6a53b7593233). > > > > Unfortunately, when a namespace exits, xfrm_state_fini only flushes > > IPSEC protocols. I don't have enough experience with the xfrm > > subsystem to know whether this is correct, however, dc00a525603650a14 > > explicitly allows non ipsec protocols, as well as 0 for "all". > > > > Would it be more appropriate for flush to also flush the non ipsec > > protocols allowed in xfrm_user.c:validate_tmpl (explicitly or with 0)? > > > > If someone with more experience with the subsystem believes that to be > > the case I'm happy to send a patch (against net or ipsec?), otherwise > > I'm going to keep digging to see if a better option presents itself. > > > > Regardless I hope the simplified reproducer might be useful. > > > > -Jason > > > > [1] > > https://syzkaller.appspot.com/bug?id=c922592229951800c197ce48a5eaab8877c33723 > > > > * I wasn't subscribed to the list for the original message, so I'm > > using the GUI to reply...apologies if anything is mangled. > > +kernel developers back to CC Thanks for the info! I'm traveling currently, so it may take some time until I can look at it.