{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139782",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.952Z",
        "datePublished": "2026-11-30T13:37:57.259Z",
        "dateUpdated": "2026-12-02T09:21:52.086Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-12-02T09:21:52.086Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncomedi: addi_apci_3xxx: fix subdevice count underallocation\n\nIn apci3xxx_auto_attach(), the number of subdevices is computed with\n\n    n_subdevices = (board->ai_n_chan ? 0 : 1) + board->has_ao + ...\n\nThe ternary is inverted: when the board has analog input channels\n(ai_n_chan != 0), it counts 0 instead of 1, so the AI subdevice that is\nactually created is not accounted for. As a result\ncomedi_alloc_subdevices() allocates one entry too few, and the later\nsubdevice initialization (notably the TTL Digital I/O subdevice, which\nis populated last) writes past the end of the allocated array, causing a\nslab out-of-bounds write.\n\nFlip the ternary to count 1 when ai_n_chan is non-zero and 0 otherwise,\nmatching the subdevice creation order in the function."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/comedi/drivers/addi_apci_3xxx.c"
                    ],
                    "versions": [
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "02a58681b48caf417edfdc100d1e7e28c0e66b97",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "2aea3d551ef6b7f1354aab0ccba5d6a189e87e10",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "40c86b6d61895bbbd83c774e362e0d2b6b584728",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "e4a9298361c79fe7c809d61c9a546ddd0cdba566",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "e4ce30e393f264def20791662865d092cd616776",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "6b5f7c695dbbba72b9a5991c084f09454b63bcb8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "0d903b068e85848347f8641c0e51c45636ee4f60",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "656e39fedcf01b688a2aa1dca78c6c2a571264f1",
                            "lessThan": "3de5aa458dede472a253266d02902bd95af8e849",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/comedi/drivers/addi_apci_3xxx.c"
                    ],
                    "versions": [
                        {
                            "version": "3.11",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "3.11",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.275",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.226",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.193",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.163",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.119",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.12.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "3.11",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/02a58681b48caf417edfdc100d1e7e28c0e66b97"
                },
                {
                    "url": "https://git.kernel.org/stable/c/2aea3d551ef6b7f1354aab0ccba5d6a189e87e10"
                },
                {
                    "url": "https://git.kernel.org/stable/c/40c86b6d61895bbbd83c774e362e0d2b6b584728"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e4a9298361c79fe7c809d61c9a546ddd0cdba566"
                },
                {
                    "url": "https://git.kernel.org/stable/c/e4ce30e393f264def20791662865d092cd616776"
                },
                {
                    "url": "https://git.kernel.org/stable/c/6b5f7c695dbbba72b9a5991c084f09454b63bcb8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/0d903b068e85848347f8641c0e51c45636ee4f60"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3de5aa458dede472a253266d02902bd95af8e849"
                }
            ],
            "title": "comedi: addi_apci_3xxx: fix subdevice count underallocation",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}