CVE-2026-138821
published high CVSS 3.1 · 7.0fbdev: sh_mobile_lcdc: check for fb_deferred_io_init() error
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux186b89659c4c67cccead52961eab0ca3b23951dc to < ccd7d2a7ca8eae95afa2ef8323bf185bf275205e · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < ac709b87bd958ddb69541c1a3e21e2171aaab121 · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < e34ec5752ac1bcf012b294562a0426ee9ad5b156 · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 4a9ad942a4b32138ca9167de22c6df02b02f8b09 · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 8e21bbb7c2ce772ea3d672c1de662c5da1e9fbeb · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 3ec236beefafd91734f5539f12e1918a1392a60f · 56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 5192201aaac2a923ff98306e3ccda58718ee395f · 5.15.149 to < 5.15.226 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux5.19 (affected) · 0 to < 5.19 (unaffected · semver) · 5.15.226 through 5.15.* (unaffected · semver) · 6.1.193 through 6.1.* (unaffected · semver) · 6.6.163 through 6.6.* (unaffected · semver) · 6.12.117 through 6.12.* (unaffected · semver) · 6.18.63 through 6.18.* (unaffected · semver) · 7.3.4 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: fbdev: sh_mobile_lcdc: check for fb_deferred_io_init() error fb_deferred_io_init() allocates deferred I/O state, populating info->fbdefio_state, or leaving it NULL if an error occurs. Currently sh_mobile_lcdc_start() ignores its return value. Therefore if an error arises in fb_deferred_io_init() (for instance, due to an allocation failure) info->fbdefio_state is left NULL. When the file is subsequently opened, fb_open() will dereference a NULL pointer (calling fb_deferred_io_open()). Fix this by checking for the error. Also clear info->fbdefio in that case, so that sh_mobile_lcdc_stop() does not attempt to clean up deferred I/O state that was never initialised.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.0 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- Scenarios
- en: AV:L - Local only: ioctl(FBIOPUT_VSCREENINFO) on /dev/fbN goes do_fb_ioctl()->fb_set_var()->sh_mobile_lcdc_set_par()->sh_mobile_lcdc_stop()/sh_mobile_lcdc_start(). The patched start() ignored the fb_deferred_io_init() failure, and a later open()/mmap()/ioctl on the same node trips over it. No external data is involved. Only SuperH boards with sys-bus panels using deferred_io_msec (migor, kfr2r09) enable this path. AC:H - The bad state needs the GFP_KERNEL kzalloc/kvzalloc in fb_deferred_io_state_alloc() (the pagerefs kvzalloc in pre-7.1 fb_deferred_io_init()) to fail. smem_len is fixed at probe, so the -EINVAL path is unreachable. The attacker can re-run set_par with FB_ACTIVATE_FORCE without limit but cannot make that small allocation fail on demand. It takes OOM-victim or fault-injection conditions. PR:L - do_fb_ioctl() has no capability check on FBIOPUT_VSCREENINFO; the only gate is open permission on /dev/fbN, normally root:video 0660. An ordinary user in the video group, such as an embedded UI process, can drive set_par, open and mmap. Root is not needed, though user namespaces do not grant access. UI:N - The attacker issues the FBIOPUT_VSCREENINFO ioctl and the follow-up open()/mmap()/write fault on the framebuffer themselves. No other user or administrator has to do anything. S:U - The NULL dereference in fb_deferred_io_open() and the freed-pagerefs corruption in older kernels both happen in the same kernel context that serves the caller's fbdev syscalls. No VM, sandbox or IOMMU boundary is crossed. C:H - On affected stable kernels (fixed in 6.1.193/6.6.163/6.12.117/6.18.63), fb_deferred_io_cleanup() from sh_mobile_lcdc_stop() kvfree()s info->pagerefs without clearing it. A failed re-init keeps that freed pointer and the stale npagerefs, so an mmap write fault makes fb_deferred_io_pageref_get() index freed heap memory. That memory can be reclaimed by attacker-chosen objects, so this is a use-after-free. I:H - fb_deferred_io_pageref_get() then writes pageref->page, ->offset and list_add_tail() linkage into the freed pagerefs buffer, and a second FBIOPUT_VSCREENINFO makes fb_deferred_io_cleanup() kvfree() it again (a double free). Both give the attacker kernel heap corruption, not just a crash. A:H - On 7.1+ the NULL info->fbdefio_state is dereferenced by fb_deferred_io_open() inside fb_open(), and by release()/mmap()/cleanup(), with the fb_info lock held. info->fbdefio stays set, so every later open oopses again. On older kernels the use-after-free or double free corrupts the heap and crashes.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 186b89659c4c67cccead52961eab0ca3b23951dc to < ccd7d2a7ca8eae95afa2ef8323bf185bf275205e (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < ac709b87bd958ddb69541c1a3e21e2171aaab121 (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < e34ec5752ac1bcf012b294562a0426ee9ad5b156 (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 4a9ad942a4b32138ca9167de22c6df02b02f8b09 (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 8e21bbb7c2ce772ea3d672c1de662c5da1e9fbeb (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 3ec236beefafd91734f5539f12e1918a1392a60f (affected · git)56c134f7f1b58be08bdb0ca8372474a4a5165f31 to < 5192201aaac2a923ff98306e3ccda58718ee395f (affected · git)5.15.149 to < 5.15.226 (affected · semver)Default: unaffected | Linux · cna |
| Linux | Linux | 5.19 (affected)0 to < 5.19 (unaffected · semver)5.15.226 through 5.15.* (unaffected · semver)6.1.193 through 6.1.* (unaffected · semver)6.6.163 through 6.6.* (unaffected · semver)6.12.117 through 6.12.* (unaffected · semver)6.18.63 through 6.18.* (unaffected · semver)7.3.4 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
7- https://git.kernel.org/stable/c/3ec236beefafd91734f5539f12e1918a1392a60f
- https://git.kernel.org/stable/c/4a9ad942a4b32138ca9167de22c6df02b02f8b09
- https://git.kernel.org/stable/c/5192201aaac2a923ff98306e3ccda58718ee395f
- https://git.kernel.org/stable/c/8e21bbb7c2ce772ea3d672c1de662c5da1e9fbeb
- https://git.kernel.org/stable/c/ac709b87bd958ddb69541c1a3e21e2171aaab121
- https://git.kernel.org/stable/c/ccd7d2a7ca8eae95afa2ef8323bf185bf275205e
- https://git.kernel.org/stable/c/e34ec5752ac1bcf012b294562a0426ee9ad5b156
Provider assertions
1Linux · cna
fbdev: sh_mobile_lcdc: check for fb_deferred_io_init() error
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 8b50a050f997ca61cf5613fac93eba6fae8cc78acf7b9f8173c7c151ec95b720
- Ingested
- 01 Dec 2026, 05:47:22 UTC
- Source record
- Official CVE record