← Back to CVE Explorer

CVE-2026-47270

Full vulnerability record from the local CVENow database.

Description

pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, pam_usb is a PAM module loaded into the host process (sudo, login, GDM, GNOME Shell). Display managers such as GDM run multiple concurrent authentication threads. Three functions used by the deny_remote feature called the non-reentrant strtok(), which stores state in a single global pointer. If two authentications race, one thread's strtok() call can overwrite the other's in-progress tokenisation pointer, causing incorrect parsing of the tmux session data or the /proc environ scan that backs the remote-session detection logic. Additionally, pusb_tmux_get_client_tty() passed the raw pointer returned by getenv(TMUX) directly to strtok(). getenv() returns a pointer into the live process environment block; strtok() inserts NUL bytes into that block, permanently corrupting the TMUX variable for subsequent code running in the same process. In long-lived display managers this affects all future authentications in that process. The combined effect can cause deny_remote=true to return an incorrect decision for a remote session, or an incorrect decision for a local session, depending on thread interleaving. This vulnerability is fixed in 0.9.0.

Severity
MEDIUM
CVSS score
6.3 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-05-27 21:16:18.950000
Last modified
2026-10-26 12:10:00.130000
View original CVE JSON
{
  "id": "CVE-2026-47270",
  "sourceIdentifier": "[email protected]",
  "published": "2026-05-27T21:16:18.950",
  "lastModified": "2026-10-26T12:10:00.130",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "pam_usb provides hardware authentication for Linux using ordinary removable media. Prior to 0.9.0, pam_usb is a PAM module loaded into the host process (sudo, login, GDM, GNOME Shell). Display managers such as GDM run multiple concurrent authentication threads. Three functions used by the deny_remote feature called the non-reentrant strtok(), which stores state in a single global pointer. If two authentications race, one thread's strtok() call can overwrite the other's in-progress tokenisation pointer, causing incorrect parsing of the tmux session data or the /proc environ scan that backs the remote-session detection logic. Additionally, pusb_tmux_get_client_tty() passed the raw pointer returned by getenv(TMUX) directly to strtok(). getenv() returns a pointer into the live process environment block; strtok() inserts NUL bytes into that block, permanently corrupting the TMUX variable for subsequent code running in the same process. In long-lived display managers this affects all future authentications in that process. The combined effect can cause deny_remote=true to return an incorrect decision for a remote session, or an incorrect decision for a local session, depending on thread interleaving. This vulnerability is fixed in 0.9.0."
    },
    {
      "lang": "es",
      "value": "pam_usb proporciona autenticación de hardware para Linux utilizando medios extraíbles ordinarios. Antes de la versión 0.9.0, pam_usb es un módulo PAM cargado en el proceso anfitrión (sudo, login, GDM, GNOME Shell). Los gestores de pantalla como GDM ejecutan múltiples hilos de autenticación concurrentes. Tres funciones utilizadas por la característica deny_remote llamaron a la función strtok() no reentrante, la cual almacena el estado en un único puntero global. Si dos autenticaciones compiten, la llamada a strtok() de un hilo puede sobrescribir el puntero de tokenización en curso del otro, causando un análisis incorrecto de los datos de la sesión de tmux o del escaneo de /proc environ que respalda la lógica de detección de sesiones remotas. Además, pusb_tmux_get_client_tty() pasó el puntero sin procesar devuelto por getenv(TMUX) directamente a strtok(). getenv() devuelve un puntero al bloque de entorno del proceso activo; strtok() inserta bytes NUL en ese bloque, corrompiendo permanentemente la variable TMUX para el código subsiguiente que se ejecute en el mismo proceso. En gestores de pantalla de larga duración, esto afecta a todas las autenticaciones futuras en ese proceso. El efecto combinado puede hacer que deny_remote=true devuelva una decisión incorrecta para una sesión remota, o una decisión incorrecta para una sesión local, dependiendo del entrelazado de hilos. Esta vulnerabilidad está corregida en la versión 0.9.0."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "mcdope",
          "product": "pam_usb",
          "versions": [
            {
              "version": "< 0.9.0",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N",
          "baseScore": 6.3,
          "baseSeverity": "MEDIUM",
          "attackVector": "LOCAL",
          "attackComplexity": "HIGH",
          "privilegesRequired": "LOW",
          "userInteraction": "NONE",
          "scope": "UNCHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "HIGH",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 1.0,
        "impactScore": 5.2
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-05-28T13:25:20.725360Z",
          "id": "CVE-2026-47270",
          "options": [
            {
              "exploitation": "none"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "total"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-362"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/mcdope/pam_usb/commit/94f1640a61d49dfaf38e782680a52f01d5bf8b51",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/mcdope/pam_usb/commit/d003e551b794a9e3774ff4720830fb7aadaa48bd",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/mcdope/pam_usb/security/advisories/GHSA-j3xw-vc43-x7jg",
      "source": "[email protected]"
    }
  ]
}