lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <64d7746e-4751-4f46-a603-ce07f586b2d2@acm.org>
Date: Wed, 3 Jul 2024 12:11:36 -0700
From: Bart Van Assche <bvanassche@....org>
To: Aleksandr Mishin <amishin@...rgos.ru>,
 Daejun Park <daejun7.park@...sung.com>, stable@...r.kernel.org,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Alim Akhtar <alim.akhtar@...sung.com>, Avri Altman <avri.altman@....com>,
 "James E.J. Bottomley" <jejb@...ux.ibm.com>,
 "Martin K. Petersen" <martin.petersen@...cle.com>,
 Can Guo <cang@...eaurora.org>, Bean Huo <beanhuo@...ron.com>,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
 lvc-project@...uxtesting.org
Subject: Re: [PATCH 6.1] scsi: ufs: ufshpb: Fix NULL deallocation in
 ufshpb_pre_req_mempool_destroy()

On 7/3/24 4:17 AM, Aleksandr Mishin wrote:
> No upstream commit exists for this commit.
> 
> The issue was introduced with commit 41d8a9333cc9 ("scsi: ufs: ufshpb:
> Add HPB 2.0 support").
> 
> In ufshpb_pre_req_mempool_destroy() __free_page() is called only if pointer
> contains NULL value.
> Fix this bug by modifying check condition.
> 
> Upstream branch code has been significantly refactored and can't be
> backported directly.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 41d8a9333cc9 ("scsi: ufs: ufshpb: Add HPB 2.0 support")
> Signed-off-by: Aleksandr Mishin <amishin@...rgos.ru>
> ---
>   drivers/ufs/core/ufshpb.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/ufs/core/ufshpb.c b/drivers/ufs/core/ufshpb.c
> index b7f412d0f301..c649e8a10a23 100644
> --- a/drivers/ufs/core/ufshpb.c
> +++ b/drivers/ufs/core/ufshpb.c
> @@ -2120,7 +2120,7 @@ static void ufshpb_pre_req_mempool_destroy(struct ufshpb_lu *hpb)
>   	for (i = 0; i < hpb->throttle_pre_req; i++) {
>   		pre_req = hpb->pre_req + i;
>   		bio_put(hpb->pre_req[i].bio);
> -		if (!pre_req->wb.m_page)
> +		if (pre_req->wb.m_page)
>   			__free_page(hpb->pre_req[i].wb.m_page);
>   		list_del_init(&pre_req->list_req);
>   	}

Are any users of the 6.1 kernel using UFS HPB support? If not, another
possibility is to backport commit 7e9609d2daea ("scsi: ufs: core: Remove
HPB support").

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ