Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp81751ybh; Fri, 13 Mar 2020 17:28:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsuXnoPcRED4QhzjiBkUUl/ShIPOCXerCjCVb6C4cA1oXuWrMMdTy50VKKd8LSOUt8TkaqL X-Received: by 2002:a9d:4b15:: with SMTP id q21mr12928213otf.84.1584145739694; Fri, 13 Mar 2020 17:28:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584145739; cv=none; d=google.com; s=arc-20160816; b=ufF+v2UVzQGmk8u58zyImRbljnits9x35lz9V4gpKKuwRktg2F5ck3/HCtO9CiVPpz FVxZ/05DsBf0lZb1ru+1s44sVC40zknWedNxybjlxWzp/tTmPt0Wla3PVw7jpzhrR6XM Jp94VsZQTCobe4pvaYeCaOGm362+7EDFEUmXLyyP2M8CXEvJOy/27BENK3jNY6hhjMFD NZQbWRR09OMeqVBjigNcZz1Idc9MdWYgVYrhna/PE3Lo5hE5/DIihJLyooqDcgZ/m5hi i8jUIUT1is6QinC5/apoNJN+/iLg9VxSavubr7Fq6cXrRh1uVqmaWgdjbIiu5rFxtLWd tFgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:mime-version:date:references :in-reply-to:cc:to:from:subject:message-id:dkim-signature; bh=Van/qq/UEi1MHg1iu9xFROdDFHfNv7eGJfIR+wXt32A=; b=N+rktXzQJMPF6vS9HqiIjYN/i07O3lZdqpv/sixZ6sPNHqWyw1te4xJJwi7CM+HsD3 t8RDxAcWvC+S2uSbaNBK6++MWWQXrpwHYf3JrPXnyK4SaOHhcZ/O618Pf4expItd5U8O aaTEuABe4REtS2FkSZpvtvxPPa4H0kxByooPWS2yC1bG12z1THag9yprz6xyMGFthELP 3JqUQ8QPDcnpkHtlB1absm6yDUW/T+oZPdb4pCzQf0irJ2SmhkBBfeHGPbbs5lX46VqX Yr7AilRx+rW6hKW0RmjjBhUnZqZZl4BLCGabNCHlR2dRlEHUVlJzLZIGAIby8s9sjp9d BAQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bonedaddy.net header.s=mail header.b=V9jN3B8T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bonedaddy.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si960655oic.26.2020.03.13.17.28.46; Fri, 13 Mar 2020 17:28:59 -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; dkim=pass header.i=@bonedaddy.net header.s=mail header.b=V9jN3B8T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=bonedaddy.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727700AbgCNA2S (ORCPT + 99 others); Fri, 13 Mar 2020 20:28:18 -0400 Received: from smtp.bonedaddy.net ([45.33.94.42]:51950 "EHLO smtp.bonedaddy.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726853AbgCNA2S (ORCPT ); Fri, 13 Mar 2020 20:28:18 -0400 Received: from chianamo (n58-108-121-150.per1.wa.optusnet.com.au [58.108.121.150]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pabs3@bonedaddy.net) by smtp.bonedaddy.net (Postfix) with ESMTPSA id 11C5D180041; Fri, 13 Mar 2020 20:28:39 -0400 (EDT) Authentication-Results: smtp.bonedaddy.net; dmarc=fail (p=none dis=none) header.from=bonedaddy.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bonedaddy.net; s=mail; t=1584145722; bh=Van/qq/UEi1MHg1iu9xFROdDFHfNv7eGJfIR+wXt32A=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=V9jN3B8TfFigALFcgqQcr/mNNnZBcMT3WtDwqXBdtMRQMdP79czio7WwEWJUut6DM UGEqXYJigPO6abienhmS9UdDmXcVXKnI7GZ3fQ6ZT7b6p029cKNXZE+HiI6hNqj1RI fKSynT0kpD+h71HAJqdvCbuLsNGihJ4SIAisj5fxmydy62jCRrPHDsX7n1RnRuZyTB 04ZcUXPmnnrnI4x8z5vtp1RDGCcFB+q3aKR5YqR7pBRCzUXz2ft9ESU0drPzAlbbDz nl8qguR3UnJlW2o1aMKlqVDBJVazQAOrK0H0tzdBhA11PCFpY4GumKD2yAvV0CtlWb /FW4tdazjtdOA== Message-ID: Subject: Re: [PATCH 0/1] coredump: Fix null pointer dereference when kernel.core_pattern is "|" From: Paul Wise To: Matthew Ruffell , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Neil Horman , Andrew Morton , Jakub Wilk In-Reply-To: <87a47997-3cde-bc86-423b-6154849183e9@canonical.com> References: <20200220051015.14971-1-matthew.ruffell@canonical.com> <645fcbdfdd1321ff3e0afaafe7eccfd034e57748.camel@bonedaddy.net> <87a47997-3cde-bc86-423b-6154849183e9@canonical.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-wjM/VlUgqSfA/5jsqClr" Date: Sat, 14 Mar 2020 08:28:10 +0800 MIME-Version: 1.0 User-Agent: Evolution 3.34.1-4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-wjM/VlUgqSfA/5jsqClr Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2020-03-10 at 11:34 +1300, Matthew Ruffell wrote: > Can I please get some feedback on this patch? Would be good to clear > up the null pointer dereference. I had a thought about it, instead of using strlen, what about checking that the first item in the array is NUL or not? In the normal case this should be faster than strlen. --=20 bye, pabs https://bonedaddy.net/pabs3/ --=-wjM/VlUgqSfA/5jsqClr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAl5sJRcACgkQMRa6Xp/6 aaOUCQ/9HWhAyOFpANVuKcuFZJ8krfZikVbHQzgXUc3lFnW+vWPuHfBlPtk0tsNR L8zxu1mmjaD87+bp6HWGi2diWJokQLf0EnfY3qhOF3q9GC7Dp5wgMznt7/oxbNCU PubopAaER5HYpgTdJrsQNskeKNxKUpynnyR3y7nJpbbslxFXUnNM2VlDYa/YIUN2 Zz8CVPzqZnMwlU9PquwZYqutX+h2P++yv+67U0dlTDxmr+L/QAhuKF33szHEYa2L 3HSoVj+Uu0CsIfkq6xijztcnWkrbotsBugEtHO/3P/2LMoj7zDAWD80RG0YZ/Pzd uP3fS88gmTSynr5CKrcdhdCSh2v8FnidwhFX2VWurvb2eSWqnx5l6nW1KqIvYCTd TnscH9UZXPk9l84UTRMIxiKKTJVfqeZT1+1mlT4KFHSiOQ2jECvUiO2jKHr/3A1a kiNEVzGAY68G7c3uwTVOe77NEp32O02Nw3VY0e/F4l6GGvRP+/GaZNiCbhs36UTs wxMzv+cu0g9BigoiEh8RlgG7+OxUDqPl1f1RefOPRcz102ZX0r3n7yAR7zI26Qv4 cz0NG1nQtfVrMFy7bnB+s1Vvt8K/qlMljK2eto9Op9mFC4q7ehjTY+3qlZS+uDj5 CyWWwjuQD77Oh9zPviEIpZQ8cPweBlBeu5UDZvLiG0+/Qc8W34w= =J9Qs -----END PGP SIGNATURE----- --=-wjM/VlUgqSfA/5jsqClr--