Bug 32526 - U-boot fails to boot on cm4 with ** Reading file would overwrite reserved memory **
Summary: U-boot fails to boot on cm4 with ** Reading file would overwrite reserved mem...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: aarch64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL:
Whiteboard: MGA9-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks: 32166
  Show dependency treegraph
 
Reported: 2023-11-15 11:29 CET by Raphael Gertz
Modified: 2023-11-20 19:12 CET (History)
8 users (show)

See Also:
Source RPM: u-boot-2023.01-1.mga9.src.rpm
CVE:
Status comment:


Attachments

Description Raphael Gertz 2023-11-15 11:29:18 CET
Description of problem:
After installing a mga9 on a rpi cm4 emmc board, it fails to boot with a message:
** Reading file would overwrite reserved memory **

Version-Release number of selected component (if applicable):
u-boot-2023.01-1.mga9

How reproducible:
Always

Steps to Reproduce:
1. Install image
2. See failure in u-boot
Comment 1 Raphael Gertz 2023-11-15 11:32:18 CET
FreeBSD encountered the sames problems:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269181

They used the patches there:
https://source.denx.de/u-boot/u-boot/-/commit/0d91c88230fe8bd9f8d39ca2ab69cd6282e9f949
https://source.denx.de/u-boot/u-boot/-/commit/2dc16a2c1f924985216b3f1d6710f96d6c4fb1ab

I added the patches to the cauldron package.

May you release an update for mga9 with them ?

With these patches applied I was able to boot a mga9 on a raspberry pi cm4 board.
Comment 2 Lewis Smith 2023-11-15 21:14:24 CET
Thanks for your work. Can you do what you ask?
CC'ing Pascal who has often maintained this in the past.

This will need an Advisory.

For QA, believe "With these patches applied I was able to boot a mga9 on a raspberry pi cm4 board." Nothing more one can try.

Assignee: bugsquad => mageia
CC: (none) => pterjan

Comment 3 Raphael Gertz 2023-11-16 10:21:17 CET
type: security
subject: Fix u-boot reading file would overwrite reserved memory error
src:
  9:
   core:
     - u-boot-2023.10-2.mga9
description: |
  U-boot would not boot after upgrading to 2023.01 version on RPI 4/CM4
  boards.

  Log would report:
  - Found EFI removable media binary efi/boot/bootaa64.efi
  - ** Reading file would overwrite reserved memory **

  The updated package allows u-boot to load properly bootaa64.efi.
references:
  - https://bugs.mageia.org/show_bug.cgi?id=32526
  - https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269181
Comment 4 Raphael Gertz 2023-11-16 10:27:01 CET
With fix applied I was able to boot my rpi cm4 successfully.

Keywords: (none) => advisory
Assignee: mageia => qa-bugs
Status: NEW => ASSIGNED
Whiteboard: (none) => MGA9-64-OK

Raphael Gertz 2023-11-16 10:27:24 CET

CC: (none) => mageia

Comment 5 Raphael Gertz 2023-11-16 10:30:37 CET
Memory issue was documented in our wiki since mga8 under rpi 4 section:
https://wiki.mageia.org/en/Installing_Mageia_on_ARM_(Raspberry_PI)
Comment 6 Thomas Andrews 2023-11-16 16:46:01 CET
Validating.

Keywords: (none) => validated_update
CC: (none) => andrewsfarm, sysadmin-bugs

Morgan Leijström 2023-11-16 17:33:01 CET

CC: (none) => fri

Comment 7 Marja Van Waes 2023-11-20 12:42:28 CET
(In reply to Raphael Gertz from comment #3)
> type: security
> subject: Fix u-boot reading file would overwrite reserved memory error
> src:
>   9:
>    core:
>      - u-boot-2023.10-2.mga9

Typo, u-boot-2023.01-2.mga9 is in updates_testing, so this wasn't yet pushed to updates. The typo has been fixed now.

CC: (none) => marja11

Filip Komar 2023-11-20 16:46:49 CET

Blocks: (none) => 32166
CC: (none) => filip.komar

Comment 8 Mageia Robot 2023-11-20 16:58:24 CET
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2023-0323.html

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED

Comment 9 Filip Komar 2023-11-20 17:14:56 CET
(In reply to Raphael Gertz from comment #5)
> Memory issue was documented in our wiki since mga8 under rpi 4 section:
> https://wiki.mageia.org/en/Installing_Mageia_on_ARM_(Raspberry_PI)

Note that link doesn't work as Bugzilla removes last Round bracket-> ).

Couldn't find a workaraound :(.
Comment 10 Jybz 2023-11-20 17:33:20 CET
Frustrated, I just find this bug report (linked to another I'm in copy).
Raphael did not reply to my email for talking about arm

We are applying patches contained in a higher version of uboot.
We can now remove the patches and update uboot from v2023.01 to any upper version of this year:
- v2023.04
- v2023.07
- v2023.10

For solving the issue
** Reading file would overwrite reserved memory **
one can also just define `kernel_addr_r=0x1000` instead of the default 0x80000 (IIRC) in the /boot/EFI/uboot.env file with uboot tools /bin/fw_setenv

I don't understand the purpose of security advisory. Why do we need it? (It does not boot, no security issue... :D)

CC: (none) => j.biernacki+mga

Comment 11 Raphael Gertz 2023-11-20 19:12:42 CET
(In reply to Jybz from comment #10)
> Frustrated, I just find this bug report (linked to another I'm in copy).
> Raphael did not reply to my email for talking about arm

Resend me the mail, I may have missed it.

> We are applying patches contained in a higher version of uboot.
> We can now remove the patches and update uboot from v2023.01 to any upper
> version of this year:
> - v2023.04
> - v2023.07
> - v2023.10

I updated cauldron to last v2023.10 version.

> For solving the issue
> ** Reading file would overwrite reserved memory **
> one can also just define `kernel_addr_r=0x1000` instead of the default
> 0x80000 (IIRC) in the /boot/EFI/uboot.env file with uboot tools
> /bin/fw_setenv

In the bugzilla thread they explain that it was a regression they introduced without consequences until rpi 4 8GB/cm4 8GB was on the market.

I am inclined to think it's better to fix the package to work by default everywhere instead of documenting somewhere a magical parameter.

> I don't understand the purpose of security advisory. Why do we need it? (It
> does not boot, no security issue... :D)

It's a bugfix update, I have not every rpi board to prevent the inclusion of a regression.

Note You need to log in before you can comment on or make changes to this bug.