Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp6066759rwi; Sun, 23 Oct 2022 17:38:58 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6oU/FIoD3PgfaNWfNZXQvrOsPhkHbts92EfoeBorQSkOypyEcNQWiiru4ZTOBw5GV//VvG X-Received: by 2002:a17:90a:ba85:b0:212:d644:fc28 with SMTP id t5-20020a17090aba8500b00212d644fc28mr15091843pjr.72.1666571938470; Sun, 23 Oct 2022 17:38:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666571938; cv=none; d=google.com; s=arc-20160816; b=COq89we8x/bziARHcl7SuSj1V63jLzu8HIHMDvjEycPMVUqnPV42MWlsnqDnsFi0WP DpKA9H4KOnC7ViLffXZ/EHe3YbyIWPLc4uUKveJpnuUKEPT5Nmr/pCpSTGRz9Kv6IdrB VMOeULqtNDP0PQs7DpCJKpnv4mjRGTzUJRSY8xWAMtONEKLlXDDiMv0r/7i6Qa096FSu P9X5lrN3G+17lzbih61+mjMP+o333vr6VfJ0J3hAKIonxGpFyEhxSBhAX4ySang2diRM jENnRDiMB0dKaBZNmKjxMIM0WzF9Ju/7hmy6J97jYcGXiyA+SLaqZjs1q89Rc+7JOOsl q/4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:feedback-id:dkim-signature:dkim-signature; bh=ZBXKiM1nTxIPIkdsp9XBL0jYPGGjwxJL9lSz+ktQ7pc=; b=rYEBgzapRw+4XSPUwLeMJsdcbM9/cb8Fw2E7eCL/YXmu6mqkblQD2rY8icllhbmzBV 6sPAPoFMxkv3HzBpmCrhE34ZcU7Gk6U5zfp0G7OvQ053y7wGgHmJ6D3YCc86ghLPxhkQ K/TlQyz2dVop2cArtUsj45d6LnYmicSaom6pPdpAU9qPK5ZgnRgdp3DE6qwdD63i8TXo y64YXxuMEYRpb4EM7YSMAl+ECIvHiKjwmaIEAXwtd1K83Z32Xa+6RT1xhIxk12rzmBUC OqLGlvCV+Otti1Z680bSo6jcF2PA4BJZ0xW1VdiTfDMFgV6nYskX9yrEDDvwh+FUJjbE lg2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@themaw.net header.s=fm2 header.b=Musun7jJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="o/yrG3t8"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a170902849100b0017a07fc8d44si14536539plo.248.2022.10.23.17.38.47; Sun, 23 Oct 2022 17:38:58 -0700 (PDT) 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=@themaw.net header.s=fm2 header.b=Musun7jJ; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b="o/yrG3t8"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229777AbiJXAHE (ORCPT + 99 others); Sun, 23 Oct 2022 20:07:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47540 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229615AbiJXAHD (ORCPT ); Sun, 23 Oct 2022 20:07:03 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53704604B4 for ; Sun, 23 Oct 2022 17:07:02 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id EBB4C32004E7; Sun, 23 Oct 2022 20:06:59 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sun, 23 Oct 2022 20:07:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1666570019; x= 1666656419; bh=ZBXKiM1nTxIPIkdsp9XBL0jYPGGjwxJL9lSz+ktQ7pc=; b=M usun7jJR3MlJW+PhUWSHuUS7N3fXwAd9UEfbZmDblTeYNkPAwqcO+Q1Q0UifvvnP h/MnlukroYzh7VlMoZeOKkpyq+kWiizKVg2tCePM/nrwSAeMDoC3E/2TJfjg0adu wftRNiNcA8H9dlpz+4hU/5W/7JdNUW8xCok0kCm3YPkzqLEQl2wbBKCNgC47qCsw hPkN5xQRuuVVfobT4BU4r6OiTTZKEFcFA2wB+HOp+LBfQlgTJ+Ln3BIv5t5ffISN i77TuYn9nrEAxInxGw01/zXc9UFfLGqu/GDy1LqKbHYnFuk8ILArgHNOERm9MBEf fp8w+kCwNiZqSM4I0P8Fw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1666570019; x= 1666656419; bh=ZBXKiM1nTxIPIkdsp9XBL0jYPGGjwxJL9lSz+ktQ7pc=; b=o /yrG3t8qyYFyjJIn6FjGWYkr7w8Oj/TLskyD/tSXaHUuKKAHq1B4NOPUQRx6fNtL IKtyn5redt25pHOhooyaaQUC5KjAp+240eF4ma4r7Bd7ZVH0K/KzjB4firMpES4x WiuP9vOg6R6tdaqBPQBt1isxBVqjDBJlCMpeIk4LDaCBHbbZ2lmKdp5gcDWYa4Dg Gk2jiuOmBI9WVRGWgIRm+vz3uY+0dn9/xUPS9pHY1KAku/v2wU4Tl8IZwdlDd/g/ SxQDMAW+Cr3xBddpFKze+AJmqWXcJdAGesLVrvlzuAvmfK/TULr81tqVwlWQWti9 BH248ph+JYofBxHiQdoBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrgedtfedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefkrghn ucfmvghnthcuoehrrghvvghnsehthhgvmhgrfidrnhgvtheqnecuggftrfgrthhtvghrnh epuefhueeiieejueevkefgiedtteehgfdutdelfffhleeflefhudeuvdefhfeghfehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhgrvhgvnh esthhhvghmrgifrdhnvght X-ME-Proxy: Feedback-ID: i31e841b0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 23 Oct 2022 20:06:53 -0400 (EDT) Message-ID: <55fad458-e2ef-3e5f-e1fa-b389167858f4@themaw.net> Date: Mon, 24 Oct 2022 08:06:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [syzbot] general protection fault in _parse_integer_fixup_radix Content-Language: en-US To: Hugh Dickins , Tetsuo Handa Cc: syzbot , syzkaller-bugs@googlegroups.com, Andrew Morton , linux-kernel@vger.kernel.org, Al Viro , Carlos Maiolino , David Howells , kernel test robot , Miklos Szeredi , Siddhesh Poyarekar , Theodore Ts'o , Hawkins Jiawei References: <0000000000002feb6605eb71458e@google.com> <17a1fdc-14a0-cf3c-784f-baa939895aef@google.com> From: Ian Kent In-Reply-To: <17a1fdc-14a0-cf3c-784f-baa939895aef@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 24/10/22 02:50, Hugh Dickins wrote: > On Sun, 23 Oct 2022, Tetsuo Handa wrote: > >> syzbot is reporting that "vfs: parse: deal with zero length string value" >> in linux-next.git broke tmpfs's mount option parsing, for tmpfs is expecting that >> vfs_parse_fs_string() returning 0 implies that param.string != NULL. >> >> The "nr_inodes" parameter for tmpfs is interpreted as "nr_inodes=$integer", but >> the addition of >> >> if (!v_size) { >> param.string = NULL; >> param.type = fs_value_is_empty; >> } else { >> >> to vfs_parse_fs_string() and >> >> if (param->type == fs_value_is_empty) >> return 0; >> >> to fs_param_is_string() broke expectation by tmpfs. >> >> Parsing an fs string that has zero length should result in the parameter >> being set to NULL so that downstream processing handles it correctly. >> >> is wrong and >> >> Parsing an fs string that has zero length should result in invalid argument >> error so that downstream processing does not dereference NULL param.string >> field. It's not quite as simple at that. Not allowing a zero length string will break cases where mount "source" can be empty. Maybe parsing of "source" would be better handled separately, rather than with options handling code, it is slightly different ... mmm ... I'll check the reported cases ... Ian