0.0
NA
CVE-2026-139782
comedi: addi_apci_3xxx: fix subdevice count underallocation
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.

INFO

Published Date :

Nov. 30, 2026, 2:20 p.m.

Last Modified :

Nov. 30, 2026, 2:20 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2026-139782 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
Solution
Fix subdevice count underallocation to prevent out-of-bounds writes.
  • Correct the ternary operator logic for subdevice counting.
  • Ensure subdevice count matches actual subdevices created.
  • Apply the fix to account for analog input channels correctly.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2026-139782 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2026-139782 weaknesses.

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2026-139782 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2026-139782 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Nov. 30, 2026

    Action Type Old Value New Value
    Added 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.
    Added Affected New affected value received. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2026/139xxx/CVE-2026-139782.json">CVE-2026-139782</a>
    Added Reference https://git.kernel.org/stable/c/02a58681b48caf417edfdc100d1e7e28c0e66b97
    Added Reference https://git.kernel.org/stable/c/0d903b068e85848347f8641c0e51c45636ee4f60
    Added Reference https://git.kernel.org/stable/c/2aea3d551ef6b7f1354aab0ccba5d6a189e87e10
    Added Reference https://git.kernel.org/stable/c/3de5aa458dede472a253266d02902bd95af8e849
    Added Reference https://git.kernel.org/stable/c/40c86b6d61895bbbd83c774e362e0d2b6b584728
    Added Reference https://git.kernel.org/stable/c/6b5f7c695dbbba72b9a5991c084f09454b63bcb8
    Added Reference https://git.kernel.org/stable/c/e4a9298361c79fe7c809d61c9a546ddd0cdba566
    Added Reference https://git.kernel.org/stable/c/e4ce30e393f264def20791662865d092cd616776
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.