CVE-2026-68436
Beschrijving NL
In de Linux kernel is de volgende kwetsbaarheid verholpen:
drm/amd/display: gebruik kvzalloc om struct dc toe te wijzen
struct dc is in de loop van de tijd groot geworden (de meeste van de twee
dc_scratch_space kopieën) en zit nu dicht bij de 4 MiB van de paginatoewijzer
aangrenzende toewijzingslimiet. De werkelijke grootte wordt niet vastgesteld door de bron
alleen, het hangt ook af van de compiler en de .config, dus het kan gemakkelijk
kruis 4 MiB, bijvoorbeeld met een nieuwere GCC of een configuratiewijziging. dc_create() wijst het toe met kzalloc(). Zodra struct dc 4 MiB overschrijdt,
aanvraag wordt naar boven afgerond op bestelling 11 (8 MiB), wat hoger is dan MAX_PAGE_ORDER,
zodat de paginatoewijzer waarschuwt en NULL retourneert. dc_create() mislukt dan, DM
init mislukt en amdgpu-sonde breekt af met -EINVAL:
WAARSCHUWING: mm/page_alloc.c:5197 bij __alloc_frozen_pages_noprof+0x2f9/0x380
dc_create+0x38/0x660 [amdgpu]
amdgpu_dm_init+0x2d9/0x510 [amdgpu]
dm_hw_init+0x1b/0x90 [amdgpu]
amdgpu_device_init.cold+0x150d/0x1e13 [amdgpu]
amdgpu_driver_load_kms+0x19/0x80 [amdgpu]
amdgpu_pci_probe+0x1e2/0x4c0 [amdgpu]
dc_create() retourneert vervolgens NULL en DM init mislukt, waardoor het geheel wordt afgebroken
GPU init en m akes amdgpu probe fail with -EINVAL ("hw_init of IP block
mislukt -22"), waardoor het scherm onbruikbaar wordt. De daaropvolgende
amdgpu_irq_put() waarschuwingen tijdens het afbreken zijn slechts gevolgen van het afwikkelen
een half-geïnitialiseerd apparaat. struct dc is een software-only boekhoudstructuur die nooit wordt overhandigd
naar hardware DMA en wordt alleen als een ondoorzichtige aanwijzer bewaard, dus dat doet het
geen fysiek aaneengesloten geheugen nodig. Toewijzen met kvzalloc()
(en vrij te maken metkvfree ()) zodat de allocator kan terugvallen op
vmalloc() wanneer een aaneengesloten toewijzing van die grootte niet beschikbaar is,
die ook de MAX_PAGE_ORDER waarschuwing volledig vermijdt. v2:
- Opnieuw baseren op amd-staging-drm-next. (kers geplukt van commit 991e0516a8072f2292681c6ae98a924ab0e32575)
Origineel (Engels) tonen
In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: use kvzalloc to allocate struct dc
struct dc has grown large over time (most of it the two inlined
dc_scratch_space copies) and now sits close to the page allocator's 4 MiB
contiguous allocation limit. Its actual size is not fixed by the source
alone, it also depends on the compiler and the .config, so it can easily
cross 4 MiB, e.g. with a newer GCC or a config change.
dc_create() allocates it with kzalloc(). Once struct dc exceeds 4 MiB the
request is rounded up to order 11 (8 MiB), which is above MAX_PAGE_ORDER,
so the page allocator warns and returns NULL. dc_create() then fails, DM
init fails and amdgpu probe aborts with -EINVAL:
WARNING: mm/page_alloc.c:5197 at __alloc_frozen_pages_noprof+0x2f9/0x380
dc_create+0x38/0x660 [amdgpu]
amdgpu_dm_init+0x2d9/0x510 [amdgpu]
dm_hw_init+0x1b/0x90 [amdgpu]
amdgpu_device_init.cold+0x150d/0x1e13 [amdgpu]
amdgpu_driver_load_kms+0x19/0x80 [amdgpu]
amdgpu_pci_probe+0x1e2/0x4c0 [amdgpu]
dc_create() then returns NULL and DM init fails, which aborts the whole
GPU init and makes amdgpu probe fail with -EINVAL ("hw_init of IP block
failed -22"), leaving the display unusable. The subsequent
amdgpu_irq_put() warnings during teardown are just fallout of unwinding
a half-initialized device.
struct dc is a software-only bookkeeping structure that is never handed
to hardware DMA and is only ever kept as an opaque pointer, so it does
not require physically contiguous memory. Allocate it with kvzalloc()
(and free it with kvfree()) so that the allocator can fall back to
vmalloc() when a contiguous allocation of that size is not available,
which also avoids the MAX_PAGE_ORDER warning entirely.
v2:
- Rebase to amd-staging-drm-next.
(cherry picked from commit 991e0516a8072f2292681c6ae98a924ab0e32575)