From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755639AbdKJCFP (ORCPT ); Thu, 9 Nov 2017 21:05:15 -0500 Received: from [128.1.224.119] ([128.1.224.119]:35654 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755440AbdKJCFO (ORCPT ); Thu, 9 Nov 2017 21:05:14 -0500 Date: Fri, 10 Nov 2017 13:04:59 +1100 From: Herbert Xu To: Dmitry Vyukov Cc: syzbot , David Miller , LKML , netdev , Steffen Klassert , syzkaller-bugs@googlegroups.com Subject: Re: kernel BUG at net/key/af_key.c:LINE! Message-ID: <20171110020459.GA22329@gondor.apana.org.au> References: <001a114a958ce46160055c4c4f66@google.com> <20171108074742.GA28177@gondor.apana.org.au> <20171109113857.GA15280@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171109113857.GA15280@gondor.apana.org.au> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 09, 2017 at 10:38:57PM +1100, Herbert Xu wrote: > > The xfrm code path is meant to forbid the creation of such a policy. > I don't currently see how this is bypassing that check. But > clearly it has found a way through the check since it's crashing. By castrating the reproducer to not perform a pfkey dump I have captured the corrupted policy via xfrm: src ???/0 dst ???/0 uid 0 socket in action allow index 2083 priority 0 ptype main share any flag (0x00000000) lifetime config: limit: soft 0(bytes), hard 0(bytes) limit: soft 0(packets), hard 0(packets) expire add: soft 0(sec), hard 0(sec) expire use: soft 0(sec), hard 0(sec) lifetime current: 0(bytes), 0(packets) add 2017-11-10 09:58:17 use 2017-11-10 09:58:20 tmpl src ac14:bb:: dst :: proto 0 spi 0x00000000(0) reqid 0(0x00000000) mode transport level 5 share any enc-mask 00000000 auth-mask 00000000 comp-mask 00000000 For comparison here is a good policy that was also created by the reproducer: src fe80::bb/0 dst ::/0 uid 0 socket in action allow index 2083 priority 0 ptype main share any flag (0x00000000) lifetime config: limit: soft 0(bytes), hard 0(bytes) limit: soft 0(packets), hard 0(packets) expire add: soft 0(sec), hard 0(sec) expire use: soft 0(sec), hard 0(sec) lifetime current: 0(bytes), 0(packets) add 2017-11-10 09:58:17 use 2017-11-10 09:58:17 tmpl src ac14:bb:: dst :: proto 0 spi 0x00000000(0) reqid 0(0x00000000) mode transport level 5 share any enc-mask 00000000 auth-mask 00000000 comp-mask 00000000 Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt