GHSA-G3V3-JGP3-J5W4

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

In the Linux kernel, the following vulnerability has been resolved:

swim: Fix buffer overflow

The effect of this bug can be observed as swim_read_sector_data() inexplicably returning -5, or an error flag indicating that a mark byte was read from the data register, or other odd behviour.

When copying bytes from the chip FIFO to the read buffer, the driver keeps count of the remaining buffer space using register %d4. A counter in register %d2 serves as a timeout. The driver polls (%a2), the handshake register, until flags indicate that byte(s) have arrived in the FIFO.

    movel   #sector_size-1, %d4

read_new_data: movew #max_retry, %d2 read_data_loop: moveb %a2@, %d5 andb #0xc0, %d5 dbne %d2, read_data_loop beq data_exit moveb %a5@, %a4@+ andb #0x40, %d5 dbne %d4, read_new_data beq exit_loop

Note that the exit_loop branch depends upon a flag in the handshake register and not on the remaining buffer space. Hence there may be no branch to exit_loop after %d4 is decremented to -1 (i.e. full buffer).

    moveb   %a5@, %a4@+
    dbra    %d4, read_new_data

exit_loop:

Here is a second decrement of %d4 which can now reach -2. But the buffer bounds check is a comparison with -1, which is now ineffective. Hence the loop will continue copying until %d2 eventually reaches -1.

Fix this bug by terminating the loop as soon as %d4 or %d2 reach -1. Reset the timeout whenever a byte is copied.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-139642"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:19:47Z",
    "severity": null
  },
  "details": "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.",
  "id": "GHSA-g3v3-jgp3-j5w4",
  "modified": "2026-11-30T15:32:39Z",
  "published": "2026-11-30T15:32:39Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139642"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/29381bf1af7faf118cbb90b2a00e7fef7992417d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/382147d4bf4fc371ae1c9beb892dfd6aacabc6b4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/504285224519be0f39e01da9fbabfc8d69b60871"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/759e236477c30e75653dc050f18ab3d1c5127c9c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/a54870a4ae4962acf341eb6ca010cae02af1a6ea"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b2f91fb5087c49828ea61da2f95263a1ff14872c"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/ec567485ac9f46d2cfaa0c444a3ddd03be8836e5"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/f7c4e7e402fc2b4b74679119a8ad42ea28b3cdff"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.