{"api_version":"1","generated_at":"2026-11-30T18:58:07+00:00","cve":"CVE-2026-139782","urls":{"html":"https://cve.report/CVE-2026-139782","api":"https://cve.report/api/cve/CVE-2026-139782.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139782","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139782"},"summary":{"title":"comedi: addi_apci_3xxx: fix subdevice count underallocation","description":"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.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:20:11","updated_at":"2026-11-30 14:20:11"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/40c86b6d61895bbbd83c774e362e0d2b6b584728","name":"https://git.kernel.org/stable/c/40c86b6d61895bbbd83c774e362e0d2b6b584728","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/0d903b068e85848347f8641c0e51c45636ee4f60","name":"https://git.kernel.org/stable/c/0d903b068e85848347f8641c0e51c45636ee4f60","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/6b5f7c695dbbba72b9a5991c084f09454b63bcb8","name":"https://git.kernel.org/stable/c/6b5f7c695dbbba72b9a5991c084f09454b63bcb8","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e4a9298361c79fe7c809d61c9a546ddd0cdba566","name":"https://git.kernel.org/stable/c/e4a9298361c79fe7c809d61c9a546ddd0cdba566","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3de5aa458dede472a253266d02902bd95af8e849","name":"https://git.kernel.org/stable/c/3de5aa458dede472a253266d02902bd95af8e849","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/2aea3d551ef6b7f1354aab0ccba5d6a189e87e10","name":"https://git.kernel.org/stable/c/2aea3d551ef6b7f1354aab0ccba5d6a189e87e10","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/e4ce30e393f264def20791662865d092cd616776","name":"https://git.kernel.org/stable/c/e4ce30e393f264def20791662865d092cd616776","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/02a58681b48caf417edfdc100d1e7e28c0e66b97","name":"https://git.kernel.org/stable/c/02a58681b48caf417edfdc100d1e7e28c0e66b97","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139782","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139782","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 02a58681b48caf417edfdc100d1e7e28c0e66b97 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 2aea3d551ef6b7f1354aab0ccba5d6a189e87e10 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 40c86b6d61895bbbd83c774e362e0d2b6b584728 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e4a9298361c79fe7c809d61c9a546ddd0cdba566 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 e4ce30e393f264def20791662865d092cd616776 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 6b5f7c695dbbba72b9a5991c084f09454b63bcb8 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 0d903b068e85848347f8641c0e51c45636ee4f60 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 3de5aa458dede472a253266d02902bd95af8e849 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.10.275 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15.226 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.193 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.6.163 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.12.119 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.18.65 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 7.3.6 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["drivers/comedi/drivers/addi_apci_3xxx.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"02a58681b48caf417edfdc100d1e7e28c0e66b97","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"2aea3d551ef6b7f1354aab0ccba5d6a189e87e10","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"40c86b6d61895bbbd83c774e362e0d2b6b584728","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"e4a9298361c79fe7c809d61c9a546ddd0cdba566","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"e4ce30e393f264def20791662865d092cd616776","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"6b5f7c695dbbba72b9a5991c084f09454b63bcb8","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"0d903b068e85848347f8641c0e51c45636ee4f60","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"3de5aa458dede472a253266d02902bd95af8e849","status":"affected","version":"1da177e4c3f41524e886b7f1b8a0c1fc7321cac2","versionType":"git"},{"lessThan":"5.10.275","status":"affected","version":"0","versionType":"semver"},{"lessThan":"5.15.226","status":"affected","version":"0","versionType":"semver"},{"lessThan":"6.1.193","status":"affected","version":"0","versionType":"semver"},{"lessThan":"6.6.163","status":"affected","version":"0","versionType":"semver"},{"lessThan":"6.12.119","status":"affected","version":"0","versionType":"semver"},{"lessThan":"6.18.65","status":"affected","version":"0","versionType":"semver"},{"lessThan":"7.3.6","status":"affected","version":"0","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["drivers/comedi/drivers/addi_apci_3xxx.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","vulnerable":true}],"negate":false,"operator":"OR"}]}],"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."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:37:57.259Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"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"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139782","datePublished":"2026-11-30T13:37:57.259Z","dateReserved":"2026-11-30T13:22:15.952Z","dateUpdated":"2026-11-30T13:37:57.259Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:20:11","lastModifiedDate":"2026-11-30 14:20:11","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139782","Ordinal":"1","Title":"comedi: addi_apci_3xxx: fix subdevice count underallocation","CVE":"CVE-2026-139782","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139782","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"comedi: addi_apci_3xxx: fix subdevice count underallocation"}]}}}