Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 642482 - <sys-apps/kexec-tools-2.0.15 build_mem_phdrs() was not checking whether a p_paddr is invalid while kernel is providing invalid PT_LOAD entries
Summary: <sys-apps/kexec-tools-2.0.15 build_mem_phdrs() was not checking whether a p_p...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-28 09:06 UTC by Xiami
Modified: 2018-01-04 09:30 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Kernel patch (linux-kernel-proc-kcore-update-physical-address-for-kcore-ram-and.patch,3.23 KB, patch)
2017-12-28 09:06 UTC, Xiami
Details | Diff
Patch for kexec-tools-2.0.14 (kexec-tools-2.0.14-build_mem_phdrs-check-if-p_paddr-is-invalid.patch,1.54 KB, patch)
2017-12-28 09:06 UTC, Xiami
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xiami 2017-12-28 09:06:12 UTC
Created attachment 511806 [details, diff]
Kernel patch

I'm running the latest stablized kexec-tools (2.0.14) and when loading crash dump core it cries out:

    ELF core (kcore) parse failed

After digging into it, I found build_mem_phdrs check physical addr wrap arounds and some segments in /proc/kcore show a physical addr of 0xFFFFFFFFFFFFFFFF.

Kernel's commit log shows it starts assigning invalid PT_LOAD physical address as -1 since Feb 27, 2017.

The first released kernel containing this code is 4.11 .
The first released kexec-tools containing a fix is 2.0.15 .

Also, a patch is found for kexec-tools-2.0.14 source rpms.

Since we had >=sys-kernel/gentoo-sources-4.11 stablized, I recommend stablizing one of >=sys-apps/kexec-tools-2.0.15 .
Comment 1 Xiami 2017-12-28 09:06:43 UTC
Created attachment 511808 [details, diff]
Patch for kexec-tools-2.0.14
Comment 2 Dainius Masiliūnas 2018-01-04 09:30:19 UTC
Indeed, this was also noticed in Ubuntu (https://bugs.launchpad.net/ubuntu/+source/kexec-tools/+bug/1713940) and Debian (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=876042). It would be best to stabilise 2.0.15 or later.