From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9607CC54EBE for ; Mon, 16 Jan 2023 15:10:24 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1D7646B0071; Mon, 16 Jan 2023 10:10:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 15EFF6B0072; Mon, 16 Jan 2023 10:10:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 026816B0073; Mon, 16 Jan 2023 10:10:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id E7B156B0071 for ; Mon, 16 Jan 2023 10:10:23 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id AC220120543 for ; Mon, 16 Jan 2023 15:10:23 +0000 (UTC) X-FDA: 80360998326.05.9549F83 Received: from mail.astralinux.ru (mail.astralinux.ru [217.74.38.119]) by imf23.hostedemail.com (Postfix) with ESMTP id 2781D14000C for ; Mon, 16 Jan 2023 15:10:20 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of eesina@astralinux.ru designates 217.74.38.119 as permitted sender) smtp.mailfrom=eesina@astralinux.ru ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673881821; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1Q5q1CFuTyprhIMJ68w99gVtMD1scLSS4tM53GTPRyo=; b=yjnLft6DIPsbNsxt/O16rTRGf69W4K+HVlgB2tWpmWy1w3zdp+zcGiEjrZBVKD6r/w2USr qhHEU1mjQqeoV8cUk/UAEKPC1iyi/ObSK30IsUZF69uYoNfuvx3W6nWwSN+ggofgmiHIAS qYJg1Q7oaYomLmwr4uqLqZqg9tjVxFE= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf23.hostedemail.com: domain of eesina@astralinux.ru designates 217.74.38.119 as permitted sender) smtp.mailfrom=eesina@astralinux.ru ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673881821; a=rsa-sha256; cv=none; b=X5pep7YrlDxqUV8QBCFx8W4/mNliwNxQZWNdUqaCsEC3B7jjvvAcsAxaSEFI2ukpFlXnvt eoy6mMHZnl2wCPysTMuhWqZVcKQg+Vzb8MDaCjbBGpHw4IJOv9F9y/uOMc5Up7tLWdVkj1 PfXi7/4E5hPb2Wjo+iQ+MR/QzrCJ9SY= Received: from localhost (localhost [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 341F61863B33; Mon, 16 Jan 2023 18:10:19 +0300 (MSK) Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GYzhsC8EECbz; Mon, 16 Jan 2023 18:10:18 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id C7C2C1863E03; Mon, 16 Jan 2023 18:10:18 +0300 (MSK) X-Virus-Scanned: amavisd-new at astralinux.ru Received: from mail.astralinux.ru ([127.0.0.1]) by localhost (rbta-msk-vsrv-mail01.astralinux.ru [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AHpHVDgdJ3UR; Mon, 16 Jan 2023 18:10:18 +0300 (MSK) Received: from rbta-msk-vsrv-mail01.astralinux.ru (localhost [127.0.0.1]) by mail.astralinux.ru (Postfix) with ESMTP id 783FC1863B33; Mon, 16 Jan 2023 18:10:18 +0300 (MSK) Date: Mon, 16 Jan 2023 18:10:18 +0300 (MSK) From: =?utf-8?B?0JXQutCw0YLQtdGA0LjQvdCwINCV0YHQuNC90LA=?= To: David Hildenbrand , Mike Kravetz Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org Message-ID: <182575210.374192581.1673881818398.JavaMail.zimbra@astralinux.ru> In-Reply-To: <6f5ac7ee-0af3-a466-cf7f-b17270bc1391@redhat.com> References: <20230116100520.71277-1-eesina@astralinux.ru> <6f5ac7ee-0af3-a466-cf7f-b17270bc1391@redhat.com> Subject: Re: [PATCH mm] mm: hugetlb: Add checks for NULL for vma returned from find_vma. find_vma may return NULL, that's why its return value is usually checked for NULL. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_517db91c-41c7-48bb-aa3d-63338ed9257c" X-Originating-IP: [10.177.177.35] X-Mailer: Zimbra 9.0.0_GA_4258 (ZimbraXWebClient - yandexbrowser22 (Linux)/9.0.0_GA_4258) Thread-Topic: hugetlb: Add checks for NULL for vma returned from find_vma. find_vma may return NULL, that's why its return value is usually checked for NULL. Thread-Index: YpEEBzuU8dnA9owx9W20hF/2yEagBQ== X-Rspamd-Queue-Id: 2781D14000C X-Stat-Signature: 7oq4kth4fexfuhbkumr73bt5wjdt3y7a X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1673881820-734791 X-HE-Meta: U2FsdGVkX1/8R+lYG5d7RhbS85STUfxrDL1TtGLzDMCxnicyjQauJgeUYbBesq4+tLF9SHgu4E5gPNomOEFBmeRCwx2eExI9y4WeNfXH4Uqiq2cO4ELPDaXnQ97XThFA5EoYkfwO9bWpbrAKWfZSmVwYViIi6Aqr9nPLpkxlWvCBJhYHeyJaC1iim0vWw5OUQ6idNXLK9Ckn63flV0dkjjDpP1KlJHWeHYzgPgKwrYtjmqSVDO3v7JErQDWpg8oQ+Q6Ce5hp+ovSVuMAmDvxs+CHkLQAHG3unucsGVnP3mQ483fCpPpfwKpo45dvE5SuHaS2kNubklI5ETyctZ0KvDL1OXzX7FekUhRkRXDHyP8Yhvjbsywlxb4vmFcBdl3VP71PlEKmo0rY48MaygwhGyUAPAEObM8FECE57pBvrbIVnav5T27w2zAcJJPfYu0WhnSoQlYX76NWPsRRnK/OAj/1iEDaYKn9oVlX3Yo3LIye8sse+5vWnMQhtto2xZGxMyJKSDjDbFtFNizoKqHDqQS+CCBYVqZKPgSttW8zdDXoDep3W65hFBVffcVG53FXfw+we7QuGsNeohLXyN8F3h0Rn+BHQp80hX8dxgA8C9Lelw6ZElGk+263gypM6/0AoQCSv9FqQ60kYdTrcd0I3WQAyyowslyP7BYcV5T/wkFzTAzJmheAbyOwzkbKD/duRrzrbDcJBPEBxGIAgUSLEuek1Wgs32w6dKBfzCaTjsejo2Di99uxbKwP9sMYoJtLNC/nlrQINPZECOqponxprBBCQa5VxdwgHHv3GhLavC80R4Q3efz6BxMnY5QCXrxUhWM6x9H4iFc/Z/2d3F8hqWOFEBFNWN91b1zqmOi3isMR1Gowdy2IYt97dLw61yfLZGjkRwLIh3zkasOUqPpaXZQn1cX03OLvU3gaZEP8R4SJacjkSCF1JEQFfLlpQRp2AEQQeEJJiEqX4pc8BMC cPXoG0YA Fg/rQ X-Bogosity: Ham, tests=bogofilter, spamicity=0.146763, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: --=_517db91c-41c7-48bb-aa3d-63338ed9257c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Sorry, I've noticed that I'd sent the patch without description and sent v= ersion 2. =C2=A0 Function find_vma may return NULL, that's why its return v= alue is usually checked for NULL. In this case vma and its fields also shou= ld be checked before dereferencing to avoid NULL pointer dereference =C2=A0= Best regards, Ekaterina Esina =20 =C2=A0 =20 =20 -----Original Message----- From: David To: Esina ; Mike Cc: Andrew ; linux-mm ; linu= x-kernel ; lvc-project Date: Monday, 16 January 2023 4:24 PM MSK Subject: Re: [PATCH mm] mm: hugetlb: Add checks for NULL for vma returned f= rom find_vma. find_vma may return NULL, that's why its return value is usua= lly checked for NULL. On 16.01.23 11:05, Esina Ekaterina wrote:=20 > Found by Astra Linux on behalf of Linux Verification Center=20 > (linuxtesting.org) with SVACE.=20 Please trim the subject and move details to the description.=20 What are the symptoms? How exactly does this BUG manifest? What is this=20 patch fixing?=20 --=20 Thanks,=20 David / dhildenb=20 =20 --=_517db91c-41c7-48bb-aa3d-63338ed9257c Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Sorry, I've noticed that I'd sent the patch without d= escription and sent version 2.
 
Function find_vma may return NULL, that's why its ret= urn value is usually checked for NULL. In this case vma and its fields also= should be checked before dereferencing to avoid NULL pointer dereference
 
Best regards,
Ekaterina Esina
 

From: David = <david@redhat.com>
To: Esina <eesina@astralinu= x.ru>; Mike <mike.kravetz@oracle.com>
Cc: Andr= ew <akpm@linux-foundation.org>; linux-mm <linux-mm@kvack.org>; = linux-kernel <linux-kernel@vger.kernel.org>; lvc-project <lvc-proj= ect@linuxtesting.org>
Date: Monday, 16 January 2023 = 4:24 PM MSK
Subject: Re: [PATCH mm] mm: hugetlb: Add ch= ecks for NULL for vma returned from find_vma. find_vma may return NULL, tha= t's why its return value is usually checked for NULL.

On 16.01.23 11= :05, Esina Ekaterina wrote:
> Found by Astra Linux on behalf of Linu= x Verification Center
> (linuxtesting.org) with SVACE.

Pleas= e trim the subject and move details to the description.

What are th= e symptoms? How exactly does this BUG manifest? What is this
patch fixi= ng?


--
Thanks,

David / dhildenb

--=_517db91c-41c7-48bb-aa3d-63338ed9257c--