CVE-2026-139782
comedi: addi_apci_3xxx: fix subdevice count underallocation
AI summary AI generated
An attacker can cause a slab out-of-bounds write in the Linux kernel comedi addi_apci_3xxx driver by triggering an undercounted subdevice allocation during attach.
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 02a58681b48caf417edfdc100d1e7e28c0e66b97; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 40c86b6d61895bbbd83c774e362e0d2b6b584728; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4a9298361c79fe7c809d61c9a546ddd0cdba566; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4ce30e393f264def20791662865d092cd616776; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 6b5f7c695dbbba72b9a5991c084f09454b63bcb8; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0d903b068e85848347f8641c0e51c45636ee4f60; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3de5aa458dede472a253266d02902bd95af8e849; < 5.10.275; < 5.15.226; …
- Anyone running Linux all versions
Vulnerability facts
- Affected
- Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 02a58681b48caf417edfdc100d1e7e28c0e66b97; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 40c86b6d61895bbbd83c774e362e0d2b6b584728; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4a9298361c79fe7c809d61c9a546ddd0cdba566; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4ce30e393f264def20791662865d092cd616776; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 6b5f7c695dbbba72b9a5991c084f09454b63bcb8; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0d903b068e85848347f8641c0e51c45636ee4f60; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3de5aa458dede472a253266d02902bd95af8e849; < 5.10.275; < 5.15.226; …; Linux all versions
- Fixed in
- Linux 02a58681b48caf417edfdc100d1e7e28c0e66b97, Linux 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10, Linux 40c86b6d61895bbbd83c774e362e0d2b6b584728, Linux 6b5f7c695dbbba72b9a5991c084f09454b63bcb8, Linux 0d903b068e85848347f8641c0e51c45636ee4f60, Linux 3de5aa458dede472a253266d02902bd95af8e849, Linux 5.10.275, Linux 5.15.226
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Unknown
- CVSS
- Not scored yet
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: comedi: addi_apci_3xxx: fix subdevice count underallocation In apci3xxx_auto_attach(), the number of subdevices is computed with n_subdevices = (board->ai_n_chan ? 0 : 1) + board->has_ao + ... The ternary is inverted: when the board has analog input channels (ai_n_chan != 0), it counts 0 instead of 1, so the AI subdevice that is actually created is not accounted for. As a result comedi_alloc_subdevices() allocates one entry too few, and the later subdevice initialization (notably the TTL Digital I/O subdevice, which is populated last) writes past the end of the allocated array, causing a slab out-of-bounds write. Flip the ternary to count 1 when ai_n_chan is non-zero and 0 otherwise, matching the subdevice creation order in the function.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 02a58681b48caf417edfdc100d1e7e28c0e66b97; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 40c86b6d61895bbbd83c774e362e0d2b6b584728; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4a9298361c79fe7c809d61c9a546ddd0cdba566; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4ce30e393f264def20791662865d092cd616776; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 6b5f7c695dbbba72b9a5991c084f09454b63bcb8; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0d903b068e85848347f8641c0e51c45636ee4f60; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3de5aa458dede472a253266d02902bd95af8e849; < 5.10.275; < 5.15.226; … | — | cvelist |
| Linux | all versions | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-139782. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-139782.md Affected: Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 02a58681b48caf417edfdc100d1e7e28c0e66b97; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 40c86b6d61895bbbd83c774e362e0d2b6b584728; >= 1da177e4c3f41524e886b7f… Fixed in: Linux 02a58681b48caf417edfdc100d1e7e28c0e66b97, Linux 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10, Linux 40c86b6d61895bbbd83c774e362e0d2b6b584728, Linux 6b5f7c695dbbba72b9a5991c084f09454b63bcb8, Linux 0d903b068e85848347f8641c0e51c45636ee4f60, Linux 3de5aa458dede472a253266d02902bd95af8e849, Linux 5.10.… Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
Technologies
References
Other
- https://git.kernel.org/stable/c/02a58681b48caf417edfdc100d1e7e28c0e66b97
- https://git.kernel.org/stable/c/2aea3d551ef6b7f1354aab0ccba5d6a189e87e10
- https://git.kernel.org/stable/c/40c86b6d61895bbbd83c774e362e0d2b6b584728
- https://git.kernel.org/stable/c/e4a9298361c79fe7c809d61c9a546ddd0cdba566
- https://git.kernel.org/stable/c/e4ce30e393f264def20791662865d092cd616776
- https://git.kernel.org/stable/c/6b5f7c695dbbba72b9a5991c084f09454b63bcb8
- https://git.kernel.org/stable/c/0d903b068e85848347f8641c0e51c45636ee4f60
- https://git.kernel.org/stable/c/3de5aa458dede472a253266d02902bd95af8e849
FAQ
Is CVE-2026-139782 being exploited?
There is no confirmed exploitation: CVE-2026-139782 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.
How serious is CVE-2026-139782?
It has no CVSS score yet. Unknown.
Which versions are affected by CVE-2026-139782?
Linux >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 02a58681b48caf417edfdc100d1e7e28c0e66b97; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 40c86b6d61895bbbd83c774e362e0d2b6b584728; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4a9298361c79fe7c809d61c9a546ddd0cdba566; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < e4ce30e393f264def20791662865d092cd616776; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 6b5f7c695dbbba72b9a5991c084f09454b63bcb8; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 0d903b068e85848347f8641c0e51c45636ee4f60; >= 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, < 3de5aa458dede472a253266d02902bd95af8e849; < 5.10.275; < 5.15.226; …; Linux all versions.
Is there a fix for CVE-2026-139782?
Yes. Fixed in Linux 02a58681b48caf417edfdc100d1e7e28c0e66b97, Linux 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10, Linux 40c86b6d61895bbbd83c774e362e0d2b6b584728, Linux 6b5f7c695dbbba72b9a5991c084f09454b63bcb8, Linux 0d903b068e85848347f8641c0e51c45636ee4f60, Linux 3de5aa458dede472a253266d02902bd95af8e849, Linux 5.10.275, Linux 5.15.226. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2026-139782?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.
More Linux kernel vulnerabilities
See all| Severity | Identifier / vulnerability | Technology | Signals | Age |
|---|---|---|---|---|
| MEDIUM 6.5 | CVE-2026-140063 Glib2: authenticated dos via pre-emptive 128mib read-buffer allocation in gdbusworker | Linux kernel+1 | ||
| MEDIUM 5.1 | CVE-2026-140038 Binutils: gprofng uses predictable /tmp directory with unchecked mkdir() enabling symlink-based file clobber | Linux kernel+1 | ||
| HIGH 7.3 | CVE-2026-139801 KVM: nSVM: Check validity of vmcs01 save area copied from SMRAM on RSM | Linux kernel | ||
| UNSCORED | CVE-2026-139800 9p/xen: drain response work after unbinding IRQ | Linux kernel | ||
| HIGH 7.0 | CVE-2026-139799 mm/shmem: hold off eviction in shmem_writeout() | Linux kernel |