Description
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 <?
Unrelated but, ugh, why is Smatch saying that "eng_id" can be negative?
end_id is type signed long, but there are checks in the caller which prevent it from being negative.
1258 vpg_inst = eng_id;
1259 afmt_inst = eng_id;
1260 } else
1261 return NULL;
1262
...
1281
1282 dcn35_dio_stream_encoder_construct(enc1, ctx, ctx->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)
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Linux | Linux | 6.9 | 6.12.75 |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | linux | 6.18.14-1 | — |
| Debian 13 | linux | 6.12.85-1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 25.10 | linux +8 | No fix yet | — |
| Ubuntu 24.04 LTS | linux-riscv +26 | No fix yet | — |
| Ubuntu 22.04 LTS | linux-riscv +32 | No fix yet | — |
| Ubuntu 20.04 LTS | linux-gke +28 | No fix yet | — |
| Ubuntu 18.04 LTS | linux-gcp +14 | No fix yet | — |
Show 2 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 16.04 LTS | linux-hwe-edge | No fix yet | — |
| Ubuntu Pro Realtime 24.04 LTS | linux-realtime-6.14 +1 | No fix yet | — |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES 15 SP7 | kernel-64kb +4 | 6.4.0-150700.53.73.2 | SUSE-SU-2026:3166-1 |
| SLES 15 SP7 | kernel-default-base | 6.4.0-150700.53.73.2.150700.17.41.4 | SUSE-SU-2026:3166-1 |
| SLES 15 SP7 | kernel-docs +2 | 6.4.0-150700.53.73.1 | SUSE-SU-2026:3166-1 |
Show 5 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| SLES for SAP 16.0 | kernel-64kb +8 | 6.12.0-160000.37.1 | SUSE-SU-2026:23231-1, SUSE-SU-2026:23221-1 |
| SLES for SAP 16.0 | kernel-default-base | 6.12.0-160000.37.1.160000.2.19 | SUSE-SU-2026:23231-1, SUSE-SU-2026:23221-1 |
| SLES 16.0 | kernel-64kb +8 | 6.12.0-160000.37.1 | SUSE-SU-2026:23237-1, SUSE-SU-2026:23231-1, SUSE-SU-2026:23221-1 |
| SLES 16.0 | kernel-default-base | 6.12.0-160000.37.1.160000.2.19 | SUSE-SU-2026:23231-1, SUSE-SU-2026:23221-1 |
| SLE Micro 6.2 | kernel-default-base | 6.12.0-160000.37.1.160000.2.19 | SUSE-SU-2026:23068-1 |
| SLE Micro 6.2 | kernel-rt +5 | 6.12.0-160000.37.1 | SUSE-SU-2026:23068-1, SUSE-SU-2026:23066-1 |
| SLE Live Patching 15 SP7 | kernel-default | 6.4.0-150700.53.73.2 | SUSE-SU-2026:3166-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7-RT_Update_18 | 1-150700.1.5.1 | SUSE-SU-2026:3130-1 |
| SLE Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_19 | 1-150700.15.3.4 | SUSE-SU-2026:3166-1 |
| SUSE Real Time Module 15 SP7 | kernel-rt +2 | 6.4.0-150700.7.67.1 | SUSE-SU-2026:3130-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Leap 16.0 | kernel-default-base | 6.12.0-160000.37.1.160000.2.19 | openSUSE-SU-2026:21555-1 |
| openSUSE Leap 16.0 | kernel-rt +11 | 6.12.0-160000.37.1 | openSUSE-SU-2026:21555-1 |
Advisories 9
- WID-SEC-2026-1802 Linux Kernel: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 12, 2026
- SUSE-SU-2026:23231-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 27, 2026
- SUSE-SU-2026:23237-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 27, 2026
- SUSE-SU-2026:23221-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 27, 2026
- SUSE-SU-2026:23066-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 15, 2026
- SUSE-SU-2026:23068-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 15, 2026
- openSUSE-SU-2026:21555-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Aug 12, 2026
- SUSE-SU-2026:3166-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 22, 2026
- SUSE-SU-2026:3130-1 Security update for the Linux Kernel SUSE / openSUSE Security Updates · Jul 21, 2026