From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752412AbdBNJIp (ORCPT ); Tue, 14 Feb 2017 04:08:45 -0500 Received: from a.mx.secunet.com ([62.96.220.36]:35068 "EHLO a.mx.secunet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750859AbdBNJIl (ORCPT ); Tue, 14 Feb 2017 04:08:41 -0500 Date: Tue, 14 Feb 2017 10:08:16 +0100 From: Steffen Klassert To: Dmitry Vyukov CC: Herbert Xu , David Miller , Eric Dumazet , netdev , LKML , syzkaller Subject: Re: net/xfrm: stack out-of-bounds in xfrm_flowi_sport Message-ID: <20170214090816.GJ30338@gauss.secunet.com> References: <20170214070854.GH30338@gauss.secunet.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [10.182.7.102] 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: 35BBA974-FB9D-46DE-8E53-A6B3E9F1A164 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 14, 2017 at 09:41:35AM +0100, Dmitry Vyukov wrote: > On Tue, Feb 14, 2017 at 8:08 AM, Steffen Klassert > wrote: > > On Mon, Feb 13, 2017 at 03:46:56PM +0100, Dmitry Vyukov wrote: > >> > >> On commit 7089db84e356562f8ba737c29e472cc42d530dbc. > >> > >> > >> struct flowi4 fl4_stack allocated on stack in udp_sendmsg is being > >> casted to larger struct flowi and then accessed. > > > > Looks like the problem is when using IPv4-mapped IPv6 addresses. > > > > Does the patch below help? > > > Steffen, can you please run the reproducer I provided? > I specifically spent time to supply you with a simple, reliable > reproducer. I am not even saying about adding a test case for the bug. > Kernel development practices seem to encourage developers to not > bother with tests. But at least testing a patch that you are sending > looks like a reasonable thing to do. I tested this with my socket policy testcases of course. I dont have a IPv4-mapped IPv6 addresses testcase and changing userspace in my test setup means to rebuild the system iso image. Asking for a test is not so uncommon. You have the testcase, why not running it again?