Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1861073rdb; Tue, 3 Oct 2023 03:28:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsIldPY4cLoK7yQt56zDD5tyGV+yVmrHi9AQbE2IswYS8ddFSFrroNOONaWzfctZyTrne9 X-Received: by 2002:a17:90a:6606:b0:26b:24ed:e0d9 with SMTP id l6-20020a17090a660600b0026b24ede0d9mr12532282pjj.33.1696328899389; Tue, 03 Oct 2023 03:28:19 -0700 (PDT) Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id v135-20020a63618d000000b005697ebac19esi1098756pgb.776.2023.10.03.03.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 03:28:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TPJ8019Q; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id E78448031AFC; Tue, 3 Oct 2023 03:28:16 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231631AbjJCK2K (ORCPT + 99 others); Tue, 3 Oct 2023 06:28:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231621AbjJCK2J (ORCPT ); Tue, 3 Oct 2023 06:28:09 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5BBBAD; Tue, 3 Oct 2023 03:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696328885; x=1727864885; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=TH2n2TxmUwPMi6S9pwhvNacJvlAhEEepN65dF8mONy0=; b=TPJ8019QPxT1U+ZGlNIJwqYt/OL/6dTGtEp6v8qTjZh271X2HbVxqNQx mIeIjAS3JLPQ3D3k7i0F+b1M8q5egImEwA0jHddlvAn6oROGrO9EYBKyC vs+7h6VA1MyRETDGkT/q901uferbyRDcxWc+CRkwE4aYwQWNb4B8FqpDV ELPVXJ5pyejoqE+Ko6BV2LFB8gmXckv3XEE2j2jFURncflDaZinDo5u1M HnppVTxvm1OTvr40cktLOl9V2Lwc0DHfRfK/Z5rX0F1IHL+n1QMKJs8UH c3mZ3BDDIWYeLkxIyOHh6+fXm9U6nhtTnGI9km6eJ7BOhLwgzm9o6rY26 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="362212592" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="362212592" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 03:28:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10851"; a="924602009" X-IronPort-AV: E=Sophos;i="6.03,196,1694761200"; d="scan'208";a="924602009" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga005.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 03 Oct 2023 03:28:03 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 3 Oct 2023 03:28:03 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Tue, 3 Oct 2023 03:28:03 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32 via Frontend Transport; Tue, 3 Oct 2023 03:28:03 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.32; Tue, 3 Oct 2023 03:28:02 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YNkTWLCnVfRXmTyj9nZ7QJB9Zb6u7BpkWO8hJ6PFo4LlVUHXVQ01vhKUJ9uCDd4h2Q2OYWomg7ZqhXA7jrUFTdmRSCgORLFlaLa/sK01RXXvc1ev8itY/Ltxy8c4TZDuVPZ61kiYvkYBaFCkmjxxPeeANlmpccA6OjZR65V8mC5ZHibKKCyY7W5a7LW7M1WWvjxuDTWcMkqZssN7s+k79BAo0M+enmQM/t7Tfe5t3JNvaRTn7R5mY9PWs5lZ0wEgTCTJTZ/zYviuOlm60lfESlpWX5wQC1oi5v1Fjv+7bWTmiepS1NvLZVpDUXaWDECgaR2CyOYsFM4w8Gy6h4pC6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=R5SybBmabLLAS0/7Jc3lIjTxDYMtvU7R/NVkDi7eezE=; b=V6tWKcd9TybW/+vIEmh9IIhyJAe6baw36Zj0o0IzWAj8Mu4K6tSCoXzBKfEByAi49oSMUmseNFzkB6E69fvyxkYrh9xASwIKEcoeX2YBtSXnzu+LUh4O246PWW1CMhyOSrmlXTdKDcxG03daQlwkTZLThuKGHreHzcG2lI3e5PD/4y+TnkoWDtUwyj1Gbugyj0moAUP0Kwan7BhFK0ESLI11c6zUqHGehkGpwQ4Gp1mLdehSyRSHnkPVegyVLlr/ooB4tnGwv+pAyGWfKoO0+F898I8am4tJZ76THMwL7ubS6jTkpiSes7bt7p7LOKUr5qSDJp4BSzVVqpQ3gLyU7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) by LV2PR11MB6022.namprd11.prod.outlook.com (2603:10b6:408:17c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.29; Tue, 3 Oct 2023 10:28:01 +0000 Received: from DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::bede:bd20:31e9:fcb4]) by DM6PR11MB3625.namprd11.prod.outlook.com ([fe80::bede:bd20:31e9:fcb4%7]) with mapi id 15.20.6768.029; Tue, 3 Oct 2023 10:28:00 +0000 Message-ID: Date: Tue, 3 Oct 2023 12:26:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH net-next v2] net/xdp: fix zero-size allocation warning in xskq_create() To: Andrew Kanner CC: , , , , , , , , , , , , , , , , , References: <20231002222939.1519-1-andrew.kanner@gmail.com> Content-Language: en-US From: Alexander Lobakin In-Reply-To: <20231002222939.1519-1-andrew.kanner@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0151.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:ba::17) To DM6PR11MB3625.namprd11.prod.outlook.com (2603:10b6:5:13a::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR11MB3625:EE_|LV2PR11MB6022:EE_ X-MS-Office365-Filtering-Correlation-Id: 05e7b1dc-4ad2-42db-ac08-08dbc3fb6a9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Ny9xTCtQSndWTE9rZnZFemd1MnV3UGNKTVRlejNrWHdTemNJekdwZURrRkNR?= =?utf-8?B?dVg3WFVVTnh6ZmlDanJNemxycUNrWEVlMnZjWlRPN2FKQ1dkaTk4NVIwdkNX?= =?utf-8?B?R1JXVVpEMWQvK0tvdEpYcCtObXFFQjdQUTFuZlozbGRwQWZYOUpUc0p3QVM4?= =?utf-8?B?czYxbUtQcE1STUhNWkpXVThhbUE3a0E0Ky9RMFk1M3JLZkhHMnA5amg3WWs1?= =?utf-8?B?TEFqcDJGaGxqbXBXUkFadlJpSUllSnBWTk15ajNvRDVPd3BuQ0lFZVNWWXFE?= =?utf-8?B?Y0hxOEZrU1ljNWVaTWdJLzVvL3FFWlVRaFF1eHhpREVzVW1iM3BNSmQyaHRw?= =?utf-8?B?ZlkxWmUyWWw5dkpCc1ppcVJCZUxUMkRaOXJwR3NQWjdoN29jRVpTR2V3VkpL?= =?utf-8?B?bkg3UUxzNXhTVEkvbGJPMDdQUHBRYWdQSXVXejRPQS9RQmFiL0huY0o4eGFD?= =?utf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plbW83VWdrZTNvWkU2d1lLeTR3?= =?utf-8?B?R1k5VytRR0tBYUE9PQ==?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB3625.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366004)(346002)(136003)(376002)(396003)(39860400002)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(6512007)(4326008)(6916009)(31686004)(66556008)(66946007)(8676002)(8936002)(5660300002)(316002)(66476007)(478600001)(7416002)(45080400002)(2906002)(6506007)(6486002)(966005)(41300700001)(6666004)(26005)(38100700002)(83380400001)(2616005)(36756003)(86362001)(31696002)(82960400001)(99710200001)(45980500001)(43740500002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SytZVVBCQVNFbG90TllLRWt1OFc3cUI3RFpMbldUbldaRmhvZXRqcE14N0gy?= =?utf-8?B?eG1CL0RqckF3NlhuNUVWTGxaVnlOVkYwMnFXdS9HT3RUMmkyMW96RTNhZ0Fi?= =?utf-8?B?YVd3UlhuaExZRHMwRUlTejNYQXVoSzVmZmh2RVl0R1BLS0RwZmhKWGs5cy9x?= =?utf-8?B?ZWpLTFJxT2ZYZVJYNUJaNDdlRlVRSWppZndaZCs4bGZqZ2xubXROZGFQL09v?= =?utf-8?B?MmNkSHlVTExKVkMvZFNGRGJXYkVtZitoRDNnSFdldWx0dUsxSHJxK0Zlb3pv?= =?utf-8?B?UTArZWpwbEZ5VkxxNkRhZjlJdW1KQU4yeXZYZzQzb0FCbjNRV3JHdkpZaXhw?= =?utf-8?B?WW9xZy8wdGV6SHp5cUF6eG1scUt0OHRuQkRJUVFWU3ZuOUtyYVc0cHgxTWFB?= =?utf-8?B?ZDRDT0pKaC9UclRsMzQwUGRTeE40eFJ1WmxUNk40QlltSzdFM3FvOGprODBW?= =?utf-8?B?WHBsK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625.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Oct 2023 10:28:00.2094 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: El9Uw/UJAC6cTj/mKoolevs0BaCUpNKMYuZuHe/fkPPcPTMzsACmHtG0B7wUEnE49HRIfdjtWE7hpolfqU0vR1MwG2NFU444SGPvS+wQpIc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR11MB6022 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-1.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 03:28:17 -0700 (PDT) From: Andrew Kanner Date: Tue, 3 Oct 2023 01:29:40 +0300 > Syzkaller reported the following issue: > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 2807 at mm/vmalloc.c:3247 __vmalloc_node_range (mm/vmalloc.c:3361) > Modules linked in: > CPU: 0 PID: 2807 Comm: repro Not tainted 6.6.0-rc2+ #12 > Hardware name: Generic DT based system > unwind_backtrace from show_stack (arch/arm/kernel/traps.c:258) > show_stack from dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1)) > dump_stack_lvl from __warn (kernel/panic.c:633 kernel/panic.c:680) > __warn from warn_slowpath_fmt (./include/linux/context_tracking.h:153 kernel/panic.c:700) > warn_slowpath_fmt from __vmalloc_node_range (mm/vmalloc.c:3361 (discriminator 3)) > __vmalloc_node_range from vmalloc_user (mm/vmalloc.c:3478) > vmalloc_user from xskq_create (net/xdp/xsk_queue.c:40) > xskq_create from xsk_setsockopt (net/xdp/xsk.c:953 net/xdp/xsk.c:1286) > xsk_setsockopt from __sys_setsockopt (net/socket.c:2308) > __sys_setsockopt from ret_fast_syscall (arch/arm/kernel/entry-common.S:68) > > xskq_get_ring_size() uses struct_size() macro to safely calculate the > size of struct xsk_queue and q->nentries of desc members. But the > syzkaller repro was able to set q->nentries with the value initially > taken from copy_from_sockptr() high enough to return SIZE_MAX by > struct_size(). The next PAGE_ALIGN(size) is such case will overflow > the size_t value and set it to 0. This will trigger WARN_ON_ONCE in > vmalloc_user() -> __vmalloc_node_range(). > > The issue is reproducible on 32-bit arm kernel. > > Reported-and-tested-by: syzbot+fae676d3cf469331fc89@syzkaller.appspotmail.com > Closes: https://lore.kernel.org/all/000000000000c84b4705fb31741e@google.com/T/ > Link: https://syzkaller.appspot.com/bug?extid=fae676d3cf469331fc89 > Fixes: 9f78bf330a66 ("xsk: support use vaddr as ring") > Signed-off-by: Andrew Kanner Reviewed-by: Alexander Lobakin [...] Thanks, Olek