From 730e6c76af4ce310e9b3469b85a05b036bb61713 Mon Sep 17 00:00:00 2001 From: Jiaqi Cheng Date: Wed, 19 Nov 2025 17:11:45 +0800 Subject: [PATCH 1/2] fwctl:Change the CONFIG_FWCTL in the config options to m driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID7GF0 CVE: NA ---------------------------------------------------------------------- Change the CONFIG_FWCTL in the config optionsto m Fixes: aabc3d653349 ("ub: ub_fwctl: Add the ub_fwctl driver and its basic features.") Signed-off-by: Jiaqi Cheng --- arch/arm64/configs/openeuler_defconfig | 2 +- arch/x86/configs/openeuler_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/configs/openeuler_defconfig b/arch/arm64/configs/openeuler_defconfig index dda5ad5b3673..7f7bedccc67c 100644 --- a/arch/arm64/configs/openeuler_defconfig +++ b/arch/arm64/configs/openeuler_defconfig @@ -2162,7 +2162,7 @@ CONFIG_FW_UPLOAD=y # end of Firmware loader # fwctl -CONFIG_FWCTL=y +CONFIG_FWCTL=m CONFIG_WANT_DEV_COREDUMP=y # CONFIG_ALLOW_DEV_COREDUMP is not set diff --git a/arch/x86/configs/openeuler_defconfig b/arch/x86/configs/openeuler_defconfig index 7d030d2d7717..8fe90aaf11ed 100644 --- a/arch/x86/configs/openeuler_defconfig +++ b/arch/x86/configs/openeuler_defconfig @@ -2160,7 +2160,7 @@ CONFIG_FW_UPLOAD=y # end of Firmware loader # fwctl -CONFIG_FWCTL=y +CONFIG_FWCTL=m CONFIG_WANT_DEV_COREDUMP=y CONFIG_ALLOW_DEV_COREDUMP=y -- Gitee From d222718375d8c0deb1c74d3152c3662c0d49907d Mon Sep 17 00:00:00 2001 From: Jiaqi Cheng Date: Wed, 19 Nov 2025 17:26:41 +0800 Subject: [PATCH 2/2] ub: ub_fwctl: Release rpc_out when kernel state return error driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/ID7GF0 CVE: NA ---------------------------------------------------------------------- ub_fwctl encountered an error while executing in kernel mode and did not release rpc_out before returning to fwctl. Fix this issue now. Fixes: aabc3d653349 ("ub: ub_fwctl: Add the ub_fwctl driver and its basic features.") Signed-off-by: Jiaqi Cheng --- drivers/fwctl/ub/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/fwctl/ub/main.c b/drivers/fwctl/ub/main.c index e96ccf5afa55..6b1f619dc0a4 100644 --- a/drivers/fwctl/ub/main.c +++ b/drivers/fwctl/ub/main.c @@ -147,6 +147,11 @@ static void *ubctl_fw_rpc(struct fwctl_uctx *uctx, enum fwctl_rpc_scope scope, ubctl_dbg(ucdev, "cmdif: opcode 0x%x retval %d\n", opcode, ret); + if (ret) { + kvfree(rpc_out); + return ERR_PTR(ret); + } + return rpc_out; } -- Gitee