Direct naar de inhoud
Kritieke cyberalerts voor jouw sector & systemen — direct in je inbox. Aanmelden →
cybernieuws.nl Cybersecurity en informatiebeveiling nieuws alerts live · 9 min 105 bronnen 1 kritiek 39 vandaag
CVE's Videos Dagbriefing

← Terug naar CVE-database

CVE-2026-46263

HIGH · 7.8 CVSS Gepubliceerd: CWE-125

Beschrijving NL

In de Linux kernel is de volgende kwetsbaarheid verholpen:

drm/amd/display: Fix out-of-bounds stream encoder index v3

eng_id kan negatief zijn en die stream_enc_regs[]
kan buiten de grenzen worden geïndexeerd. eng_id wordt rechtstreeks als index gebruikt in stream_enc_regs[], dat
slechts 5 ingangen. Wanneer ENG_id 5 (ENGINE_ID_DIGF) of negatief is, kan dit
toegang tot het geheugen voorbij het einde van de array. Voeg een grenscontrole toe met ARRAY_SIZE() voordat u eng_id als index gebruikt. De niet-ondertekende cast verwerpt ook negatieve waarden. Dit voorkomt out-of-bounds toegang. Lost de onderstaande smatch-fout op:
dcn*_resource.c: stream_encoder_create() mag indexeren
stream_enc_regs[eng_id] buiten bereik (grootte 5). drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn351/dcn351_resource.c
1246 static struct stream_encoder *dcn35_stream_encoder_create(
1247 enum engine_id eng_id,
1248 struct dc_context *ctx)
1249 {

... 1255
1256 /* In kaart brengen van VPG-, AFMT-, DME-REGISTERBLOKKEN aan DIO-blokinstantie */
1257 if (eng_id <= ENGINE_ID_DIGF) {

ENGINE_ID_DIGF is 5. moet <= dc_bios zijn,
1283 eng_id, vpg, afmt,
--> 1284 &stream_enc_regs[eng_id],
^^^^^^^^^^^^^^^^^^^^^^^ Deze stream_enc_regs[] -array heeft 5 elementen, dus we zijn één element voorbij het einde van de array. ... 1287 return &enc1->base;
1288 }

v2: gebruik expliciete grenscontrole zoals voorgesteld door Roman/Dan; vermijd niet-ondertekende int cast

v3: De samensteller weet de twee waarden al te vergelijken, dus de
cast (int) is niet nodig. (Romeins)

Origineel (Engels) tonen

In the Linux kernel, the following vulnerability has been resolved:

drm/amd/display: Fix out-of-bounds stream encoder index v3

eng_id can be negative and that stream_enc_regs[]
can be indexed out of bounds.

eng_id is used directly as an index into stream_enc_regs[], which has
only 5 entries. When eng_id is 5 (ENGINE_ID_DIGF) or negative, this can
access memory past the end of the array.

Add a bounds check using ARRAY_SIZE() before using eng_id as an index.
The unsigned cast also rejects negative values.

This avoids out-of-bounds access.

Fixes the below smatch error:
dcn*_resource.c: stream_encoder_create() may index
stream_enc_regs[eng_id] out of bounds (size 5).

drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn351/dcn351_resource.c
1246 static struct stream_encoder *dcn35_stream_encoder_create(
1247 enum engine_id eng_id,
1248 struct dc_context *ctx)
1249 {

...

1255
1256 /* Mapping of VPG, AFMT, DME register blocks to DIO block instance */
1257 if (eng_id <= ENGINE_ID_DIGF) {

ENGINE_ID_DIGF is 5. should <= be dc_bios,
1283 eng_id, vpg, afmt,
--> 1284 &stream_enc_regs[eng_id],
^^^^^^^^^^^^^^^^^^^^^^^ This stream_enc_regs[] array has 5 elements so we are one element beyond the end of the array.

...

1287 return &enc1->base;
1288 }

v2: use explicit bounds check as suggested by Roman/Dan; avoid unsigned int cast

v3: The compiler already knows how to compare the two values, so the
cast (int) is not needed. (Roman)

Vendors

Linux

Affected products

Linux Kernel

References