{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139642",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.945Z",
        "datePublished": "2026-11-30T13:36:38.542Z",
        "dateUpdated": "2026-11-30T13:36:38.542Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:36:38.542Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nswim: Fix buffer overflow\n\nThe effect of this bug can be observed as swim_read_sector_data()\ninexplicably returning -5, or an error flag indicating that a mark byte\nwas read from the data register, or other odd behviour.\n\nWhen copying bytes from the chip FIFO to the read buffer, the driver\nkeeps count of the remaining buffer space using register %d4. A counter\nin register %d2 serves as a timeout. The driver polls (%a2), the handshake\nregister, until flags indicate that byte(s) have arrived in the FIFO.\n\n        movel   #sector_size-1, %d4\nread_new_data:\n        movew   #max_retry, %d2\nread_data_loop:\n        moveb   %a2@, %d5\n        andb    #0xc0, %d5\n        dbne    %d2, read_data_loop\n        beq     data_exit\n        moveb   %a5@, %a4@+\n        andb    #0x40, %d5\n        dbne    %d4, read_new_data\n        beq     exit_loop\n\nNote that the exit_loop branch depends upon a flag in the handshake\nregister and not on the remaining buffer space. Hence there may be no\nbranch to exit_loop after %d4 is decremented to -1 (i.e. full buffer).\n\n        moveb   %a5@, %a4@+\n        dbra    %d4, read_new_data\nexit_loop:\n\nHere is a second decrement of %d4 which can now reach -2. But the buffer\nbounds check is a comparison with -1, which is now ineffective. Hence the\nloop will continue copying until %d2 eventually reaches -1.\n\nFix this bug by terminating the loop as soon as %d4 or %d2 reach -1.\nReset the timeout whenever a byte is copied."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "drivers/block/swim_asm.S"
                    ],
                    "versions": [
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "f7c4e7e402fc2b4b74679119a8ad42ea28b3cdff",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "ec567485ac9f46d2cfaa0c444a3ddd03be8836e5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "382147d4bf4fc371ae1c9beb892dfd6aacabc6b4",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "504285224519be0f39e01da9fbabfc8d69b60871",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "29381bf1af7faf118cbb90b2a00e7fef7992417d",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "b2f91fb5087c49828ea61da2f95263a1ff14872c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "759e236477c30e75653dc050f18ab3d1c5127c9c",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "8852ecd97488249ca7fe2c0d3eb44cae95886881",
                            "lessThan": "a54870a4ae4962acf341eb6ca010cae02af1a6ea",
                            "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/block/swim_asm.S"
                    ],
                    "versions": [
                        {
                            "version": "2.6.30",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "2.6.30",
                            "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": "2.6.30",
                                    "versionEndExcluding": "5.10.275"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "5.15.226"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.1.193"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.6.163"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.12.119"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "2.6.30",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/f7c4e7e402fc2b4b74679119a8ad42ea28b3cdff"
                },
                {
                    "url": "https://git.kernel.org/stable/c/ec567485ac9f46d2cfaa0c444a3ddd03be8836e5"
                },
                {
                    "url": "https://git.kernel.org/stable/c/382147d4bf4fc371ae1c9beb892dfd6aacabc6b4"
                },
                {
                    "url": "https://git.kernel.org/stable/c/504285224519be0f39e01da9fbabfc8d69b60871"
                },
                {
                    "url": "https://git.kernel.org/stable/c/29381bf1af7faf118cbb90b2a00e7fef7992417d"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b2f91fb5087c49828ea61da2f95263a1ff14872c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/759e236477c30e75653dc050f18ab3d1c5127c9c"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a54870a4ae4962acf341eb6ca010cae02af1a6ea"
                }
            ],
            "title": "swim: Fix buffer overflow",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}