summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorMartin Schwan <[email protected]>2026-02-11 09:36:22 +0100
committerTom Rini <[email protected]>2026-02-16 11:52:01 -0600
commitc3538f788dbac291df24171ae1eeb1563ab8af53 (patch)
tree20ec955a3e420e9603ed803d1b5b1a5e3caf067c /boot
parent2ac30d21e459736acb164c363498596872e0bfb3 (diff)
bootstd: rauc: Fix null pointer access while checking root part
Fix a segmentation fault caused by a null pointer access during root partition checking. The function part_get_info() was falsely given null for the disk_partition struct, which later resulted in accessing a null pointer and thus undefined behavior. Fixes: 5d7c080ae5dc ("bootstd: rauc: Don't check root part filesystem") Signed-off-by: Martin Schwan <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootmeth_rauc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/boot/bootmeth_rauc.c b/boot/bootmeth_rauc.c
index 432d170e006..d7b0c686ffe 100644
--- a/boot/bootmeth_rauc.c
+++ b/boot/bootmeth_rauc.c
@@ -97,6 +97,7 @@ static int distro_rauc_scan_parts(struct bootflow *bflow)
{
struct blk_desc *desc;
struct distro_rauc_priv *priv;
+ struct disk_partition fs_info;
char *boot_order;
const char **boot_order_list;
bool slot_found = false;
@@ -123,7 +124,7 @@ static int distro_rauc_scan_parts(struct bootflow *bflow)
if (ret)
continue;
fs_close();
- ret = part_get_info(desc, slot->root_part, NULL);
+ ret = part_get_info(desc, slot->root_part, &fs_info);
if (ret)
continue;
slot_found = true;