CVE-2026-139782

comedi: addi_apci_3xxx: fix subdevice count underallocation

No CVSS score yet EPSS 0.34%

Published 30 Nov 2026 Updated 2 Dec 2026 CNA: Linux

Check your servers for CVE-2026-139782

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139782 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Exploitation

EPSS 0.34%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 30.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 02a58681b48caf417edfdc100d1e7e28c0e66b97
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 40c86b6d61895bbbd83c774e362e0d2b6b584728
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before e4a9298361c79fe7c809d61c9a546ddd0cdba566
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before e4ce30e393f264def20791662865d092cd616776
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 6b5f7c695dbbba72b9a5991c084f09454b63bcb8
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 0d903b068e85848347f8641c0e51c45636ee4f60
affected from 656e39fedcf01b688a2aa1dca78c6c2a571264f1, before 3de5aa458dede472a253266d02902bd95af8e849
Other versions: unaffected
Linux
affected 3.11
unaffected before 3.11
unaffected from 5.10.275 up to and including 5.10.*
unaffected from 5.15.226 up to and including 5.15.*
unaffected from 6.1.193 up to and including 6.1.*
unaffected from 6.6.163 up to and including 6.6.*
unaffected from 6.12.119 up to and including 6.12.*
unaffected from 6.18.65 up to and including 6.18.*
unaffected from 7.3.6 up to and including 7.3.*
unaffected 7.4-rc1 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139782 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139782

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-139782
trivy image --scanners vuln IMAGE | grep CVE-2026-139782

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-139782 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.