Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B23691A3145 for ; Wed, 26 Feb 2025 01:57:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535048; cv=none; b=SNr95ecmo7s6/5UBe743b/vGaB0LdGnsP26fhvA9YfReUMdhqdOKnz0SvdproDmeh8rFrXUEuUSAk2Slf7D+6D7fIS2ANtaw5Lfjsfu4gU/d9rXrjEC9BZDkxASKzEk7W8j6J/RxpWv6nT2Ocz7lEZU2FhWk3BoYii1Xkp+t9Fs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740535048; c=relaxed/simple; bh=u2mm8ASZlbORYzETSlDrED3RoNgmasnRRw54qGKE7os=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pUZ4e/FxEPqkUkI3urvILRhvhR0uyuVNee4PGA+TMvnRS+Yu965yKHuomePiCHpdZ9p89arLdXOmDaeiwZSu1ONkluw5YE8Qyh4oQnx2TZZRLgeMruahd2qkyWDnc4foW0X+fxAKO9Rv4IU7QUNEYwC4PxsnXboOJ87YIty/0IQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gPxHh/tx; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gPxHh/tx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 213DCC4CEDD; Wed, 26 Feb 2025 01:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740535048; bh=u2mm8ASZlbORYzETSlDrED3RoNgmasnRRw54qGKE7os=; h=From:To:Cc:Subject:Date:Reply-to:From; b=gPxHh/tx+kYA1S+v61IHVn5Wt3Us57xR+zIsIcNk/yl5/PponS3KPXKb06E9SKEpW RK/FWxWbYWNY7V9zd6uzkRpPI2gbyNN8U+swmYelf6rc0b84qLuDdIOlsN3fwAG3ZM eszgIk4xzc0ixjrzIShM+6Z2J468/5peY7mmtJBE= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2021-47651: soc: qcom: rpmpd: Check for null return of devm_kcalloc Date: Wed, 26 Feb 2025 02:54:02 +0100 Message-ID: <2025022649-CVE-2021-47651-57dd@gregkh> X-Mailer: git-send-email 2.48.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3063; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=u2mm8ASZlbORYzETSlDrED3RoNgmasnRRw54qGKE7os=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7SnTjblycuWGGXVAa3/WimfISzML7/7Vcui1vIcv5R 5jJy4G7I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYi3MqwYKLk+eu//m/N1Dqn suLKm+qV87dfTWeYK2azRGVFms3X5LwXl+JOXW8sjOS5AwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: soc: qcom: rpmpd: Check for null return of devm_kcalloc Because of the possible failure of the allocation, data->domains might be NULL pointer and will cause the dereference of the NULL pointer later. Therefore, it might be better to check it and directly return -ENOMEM without releasing data manually if fails, because the comment of the devm_kmalloc() says "Memory allocated with this function is automatically freed on driver detach.". The Linux kernel CVE team has assigned CVE-2021-47651 to this issue. Affected and fixed versions =========================== Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.4.189 with commit 755dbc3d73789ac9f0017c729abf5e4b153bf799 Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.10.110 with commit b5d6eba71997b6d661935d2b15094ac7f9f6132d Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.15.33 with commit 724376c30af5a57686b223dbcd6188e07d2a1de2 Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.16.19 with commit 84b89fa877ad576e9ee8130f412cfd592f274508 Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.17.2 with commit 31b5124d742969ea8bf7a1360596f548ca23e770 Issue introduced in 5.1 with commit bbe3a66c3f5a65fb3d702351bac2a6033944d389 and fixed in 5.18 with commit 5a811126d38f9767a20cc271b34db7c8efc5a46c Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2021-47651 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/soc/qcom/rpmpd.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/755dbc3d73789ac9f0017c729abf5e4b153bf799 https://git.kernel.org/stable/c/b5d6eba71997b6d661935d2b15094ac7f9f6132d https://git.kernel.org/stable/c/724376c30af5a57686b223dbcd6188e07d2a1de2 https://git.kernel.org/stable/c/84b89fa877ad576e9ee8130f412cfd592f274508 https://git.kernel.org/stable/c/31b5124d742969ea8bf7a1360596f548ca23e770 https://git.kernel.org/stable/c/5a811126d38f9767a20cc271b34db7c8efc5a46c