Skip to content

Add a null pointer check in opal powercap

Mamatha Inamdar requested to merge mainamdar/centos-stream-9:RHEL-37050 into main

Description: Add a null pointer check in opal powercap

JIRA: https://issues.redhat.com/browse/RHEL-37050

CVE: CVE-2023-52696

Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=61354160

Tested: Verified Brew build test kernel RPMs

Signed-off-by: Mamatha Inamdar minamdar@redhat.com

commit e123015c0ba859cf48aa7f89c5016cc6e98e018d Author: Kunwu Chan chentao@kylinos.cn Date: Sun Nov 26 17:57:39 2023 +0800

powerpc/powernv: Add a null pointer check in opal_powercap_init()

kasprintf() returns a pointer to dynamically allocated memory
which can be NULL upon failure.

Fixes: b9ef7b4b867f ("powerpc: Convert to using %pOFn instead of device_node.name")
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231126095739.1501990-1-chentao@kylinos.cn

Signed-off-by: Mamatha Inamdar minamdar@redhat.com

Merge request reports