[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] disk/mdraid1x_linux: Prevent infinite recursion
From: |
Daniel Kiper |
Subject: |
Re: [PATCH] disk/mdraid1x_linux: Prevent infinite recursion |
Date: |
Mon, 6 May 2024 20:26:27 +0200 |
On Mon, Apr 29, 2024 at 04:38:03PM +0000, Lidong Chen wrote:
> The test corpus for version-1 RAID generated an infinite recursion
> in grub_partition_iterate() while attempting to read the superblock.
> The reason for the issue was that the data region overlapped with
> the superblock.
>
> The infinite call loop looks like this:
> grub_partition_iterate() -> partmap->iterate() ->
> -> grub_disk_read() -> grub_disk_read_small() ->
> -> grub_disk_read_small_real() -> grub_diskfilter_read() ->
> -> read_lv() -> read_segment() -> grub_diskfilter_read_node() ->
> -> grub_disk_read() -> grub_disk_read_small() ->...
>
> The fix adds checks for both the superblock region and the data
> region when parsing the superblock metadata in grub_mdraid_detect().
>
> Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Daniel
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH] disk/mdraid1x_linux: Prevent infinite recursion,
Daniel Kiper <=