{"id":"CVE-2025-40322","state":"PUBLISHED","title":"fbdev: bitblit: bound-check glyph index in bit_putcs*","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nfbdev: bitblit: bound-check glyph index in bit_putcs*\n\nbit_putcs_aligned()/unaligned() derived the glyph pointer from the\ncharacter value masked by 0xff/0x1ff, which may exceed the actual font's\nglyph count and read past the end of the built-in font array.\nClamp the index to the actual glyph count before computing the address.\n\nThis fixes a global out-of-bounds read reported by syzbot.","publishedAt":"2025-12-08T00:46:49.773Z","updatedAt":"2026-08-05T12:09:35.122Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"a10cede006f9614b465cf25609a8753efbfd45cc","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0998a6cb232674408a03e8561dc15aa266b2f53b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"db5c9a162d2f42bcc842b76b3d935dcc050a0eec","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"c12003bf91fdff381c55ef54fef3e961a5af2545","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9ba1a7802ca9a2590cef95b253e6526f4364477f","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"901f44227072be60812fe8083e83e1533c04eed1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"efaf89a75a29b2d179bf4fe63ca62852e93ad620","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18c4ef4e765a798b47980555ed665d78b71aeadf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/video/fbdev/core/bitblit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.302","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.117","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.58","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.8","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/video/fbdev/core/bitblit.c"]}],"references":["https://git.kernel.org/stable/c/a10cede006f9614b465cf25609a8753efbfd45cc","https://git.kernel.org/stable/c/0998a6cb232674408a03e8561dc15aa266b2f53b","https://git.kernel.org/stable/c/db5c9a162d2f42bcc842b76b3d935dcc050a0eec","https://git.kernel.org/stable/c/c12003bf91fdff381c55ef54fef3e961a5af2545","https://git.kernel.org/stable/c/9ba1a7802ca9a2590cef95b253e6526f4364477f","https://git.kernel.org/stable/c/901f44227072be60812fe8083e83e1533c04eed1","https://git.kernel.org/stable/c/efaf89a75a29b2d179bf4fe63ca62852e93ad620","https://git.kernel.org/stable/c/18c4ef4e765a798b47980555ed665d78b71aeadf"],"weaknesses":[],"ingestedAt":"2026-10-29T20:09:09.358Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/40xxx/CVE-2025-40322.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-40322","state":"PUBLISHED","datePublished":"2025-12-08T00:46:49.773Z","dateUpdated":"2026-08-05T12:09:35.122Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T07:20:57.186Z"},"containers":{"cna":{"title":"fbdev: bitblit: bound-check glyph index in bit_putcs*","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nfbdev: bitblit: bound-check glyph index in bit_putcs*\n\nbit_putcs_aligned()/unaligned() derived the glyph pointer from the\ncharacter value masked by 0xff/0x1ff, which may exceed the actual font's\nglyph count and read past the end of the built-in font array.\nClamp the index to the actual glyph count before computing the address.\n\nThis fixes a global out-of-bounds read reported by syzbot."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"a10cede006f9614b465cf25609a8753efbfd45cc","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"0998a6cb232674408a03e8561dc15aa266b2f53b","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"db5c9a162d2f42bcc842b76b3d935dcc050a0eec","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"c12003bf91fdff381c55ef54fef3e961a5af2545","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"9ba1a7802ca9a2590cef95b253e6526f4364477f","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"901f44227072be60812fe8083e83e1533c04eed1","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"efaf89a75a29b2d179bf4fe63ca62852e93ad620","versionType":"git"},{"version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","status":"affected","lessThan":"18c4ef4e765a798b47980555ed665d78b71aeadf","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/video/fbdev/core/bitblit.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.12","status":"affected"},{"version":"0","status":"unaffected","lessThan":"2.6.12","versionType":"semver"},{"version":"5.4.302","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.247","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.197","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.159","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.117","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.58","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.17.8","status":"unaffected","lessThanOrEqual":"6.17.*","versionType":"semver"},{"version":"6.18","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/video/fbdev/core/bitblit.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/a10cede006f9614b465cf25609a8753efbfd45cc"},{"url":"https://git.kernel.org/stable/c/0998a6cb232674408a03e8561dc15aa266b2f53b"},{"url":"https://git.kernel.org/stable/c/db5c9a162d2f42bcc842b76b3d935dcc050a0eec"},{"url":"https://git.kernel.org/stable/c/c12003bf91fdff381c55ef54fef3e961a5af2545"},{"url":"https://git.kernel.org/stable/c/9ba1a7802ca9a2590cef95b253e6526f4364477f"},{"url":"https://git.kernel.org/stable/c/901f44227072be60812fe8083e83e1533c04eed1"},{"url":"https://git.kernel.org/stable/c/efaf89a75a29b2d179bf4fe63ca62852e93ad620"},{"url":"https://git.kernel.org/stable/c/18c4ef4e765a798b47980555ed665d78b71aeadf"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable render path is reached only through local interfaces — `KDFONTOP` ioctl on a VT plus writes to `/dev/vcsa*` or the tty itself. There is no remote or adjacent-network exposure of fbcon.\nAC:L - The attacker fully controls both the desync (choosing font dimensions that make `vc_do_resize()` fail deterministically via `new_screen_size > KMALLOC_MAX_SIZE` or `!new_screen_size`) and the trigger (writing glyph indices 256–511 into the screen buffer); syzbot has a working C reproducer.\nPR:L - `KDFONTOP(KD_FONT_OP_SET)` and `PIO_UNIMAP` only require `perm`, which is granted to any unprivileged user whose controlling tty is the VT (`current->signal->tty == tty`) — no capability is needed, and `vcs_open()` performs no capability check at all.\nUI:N - The attacker performs the font ioctl and the console write entirely from its own process; no victim action or cooperation is needed.\nS:U - The out-of-bounds read stays within the kernel's own memory and the impact is confined to the kernel security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - Up to 256 glyph cells are read past the font array — 4 KB beyond the global `fontdata_8x16`, or up to ~256 KB beyond a large user-supplied font — and those raw kernel bytes are blitted to the framebuffer as bitmaps that the attacker can read back via `/dev/fb0`, yielding a substantial kernel memory disclosure primitive.\nI:N - The defect is strictly an out-of-bounds read; the fetched bytes are copied into correctly sized pixmap and attribute buffers, so no kernel memory is modified and no write or control-flow primitive is produced.\nA:H - When the active font is a large kvmalloc-backed user font, the overrun can run hundreds of kilobytes past the allocation into a vmalloc guard page, faulting inside `bit_putcs()` while `console_lock` is held and oopsing/hanging the system; on KASAN builds it trips a report that can panic."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T12:09:35.122Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.4.302"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.10.247"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"5.15.197"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.1.159"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.6.117"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.12.58"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.17.8"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.12","versionEndExcluding":"6.18"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-16T19:33:40.857434Z","id":"CVE-2025-40322","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-16T19:34:17.887Z"}}]}}}