{
  "id": "CB-UBU-DESK-004",
  "standard": "ubuntu",
  "version": "0.1.1",
  "url": "https://baselines.cirsec.org/b/ubuntu/v0.1.1/CB-UBU-DESK-004",
  "json": "https://baselines.cirsec.org/b/ubuntu/v0.1.1/CB-UBU-DESK-004.json",
  "yaml": "https://baselines.cirsec.org/b/ubuntu/v0.1.1/CB-UBU-DESK-004.yml",
  "profiles_effective": [
    "desktop",
    "desktop-hardened"
  ],
  "license": "Text CC BY 4.0, code Apache-2.0",
  "attribution": "CIRSEC Baselines, https://baselines.cirsec.org",
  "control": {
    "id": "CB-UBU-DESK-004",
    "title": "Never run software automatically from inserted media in GNOME",
    "finding": {
      "title": "GNOME can start programs from inserted media",
      "description": "When a disc or USB device is inserted, GNOME may offer or start the program the medium declares, which a crafted medium can abuse."
    },
    "status": "active",
    "profiles": [
      "desktop"
    ],
    "risk": {
      "severity": "medium"
    },
    "assessment": "automated",
    "tags": [
      "gnome",
      "dconf",
      "removable-media"
    ],
    "applicability": {
      "facts": [
        "desktop-gnome"
      ]
    },
    "description": "`org.gnome.desktop.media-handling autorun-never` set to `true` stops GNOME from prompting\nfor or launching programs when media are inserted. The key is set in the system dconf\ndatabase `local` and locked.\n",
    "rationale": "Autorun turns the insertion of a medium into code execution with one click, or none if the\nuser chose \"always\". It is a classic infection path for removable media.\n",
    "impact": "Users open media content themselves from the file manager.\n",
    "notes": "Ubuntu 24.04 and 26.04 (GNOME 46 and 50) already default to `true`; 20.04 and 22.04 (GNOME\n3.36 and 42) default to `false`. In every version, users can change\nit unless the key is locked.\n",
    "setting": {
      "location": "/etc/dconf/db/local.d/, key /org/gnome/desktop/media-handling/autorun-never",
      "default_value": "false (20.04, 22.04), true (24.04, 26.04), not locked",
      "recommended_value": "true, locked"
    },
    "audit": {
      "manual": "1. `dconf read /org/gnome/desktop/media-handling/autorun-never` must print `true`.\n2. The key must be listed in a file of `/etc/dconf/db/local.d/locks/`.\n",
      "checks": [
        {
          "id": "autorun-never",
          "engine": "dconf",
          "description": "GNOME never runs software from inserted media.",
          "facts": [
            "desktop-gnome"
          ],
          "spec": {
            "key": "/org/gnome/desktop/media-handling/autorun-never",
            "value": "true"
          }
        }
      ]
    },
    "remediation": {
      "manual": "1. Make sure `/etc/dconf/profile/user` contains `user-db:user` and `system-db:local`.\n2. Create `/etc/dconf/db/local.d/00-media-autorun`:\n   ```\n   [org/gnome/desktop/media-handling]\n   autorun-never=true\n   ```\n3. List `/org/gnome/desktop/media-handling/autorun-never` in\n   `/etc/dconf/db/local.d/locks/00-media-autorun`.\n4. Run `dconf update`.\n",
      "effects": {
        "restart": "session",
        "disruption": "none",
        "lockout_risk": false
      },
      "rollback": "Delete the files written in `/etc/dconf/db/local.d/` and its `locks/` directory, then run\n`dconf update`.\n",
      "scripts": [
        {
          "id": "autorun-never",
          "from_check": "autorun-never"
        }
      ]
    },
    "references": [
      {
        "title": "gsettings-desktop-schemas - org.gnome.desktop.media-handling schema",
        "url": "https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/blob/master/schemas/org.gnome.desktop.media-handling.gschema.xml.in",
        "publisher": "The GNOME Project",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      },
      {
        "title": "GNOME System Administration Guide - Lock down specific settings",
        "url": "https://help.gnome.org/admin/system-admin-guide/stable/dconf-lockdown.html.en",
        "publisher": "The GNOME Project",
        "kind": "vendor-doc",
        "accessed": "2026-10-19"
      }
    ],
    "mappings": [
      {
        "framework": "nist-800-53r5",
        "framework_version": "5.1.1",
        "id": "CM-7",
        "relation": "related"
      }
    ],
    "threats": [
      {
        "framework": "mitre-attack",
        "id": "T1091"
      }
    ],
    "related_controls": [
      {
        "id": "CB-UBU-DESK-001",
        "type": "related"
      }
    ],
    "authors": [
      {
        "name": "Alice",
        "github": "Sn0wAlice"
      }
    ],
    "verified": [
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "20.04"
        ],
        "environment": "Proxmox VM with Ubuntu Desktop (GNOME 3.36, gdm3), Ubuntu 20.04.6, kernel 5.4.0-216-generic",
        "notes": "Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "22.04"
        ],
        "environment": "Proxmox VM with Ubuntu Desktop (GNOME 42, gdm3), Ubuntu 22.04.5, kernel 5.15.0-198-generic",
        "notes": "Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "24.04"
        ],
        "environment": "Proxmox VM with Ubuntu Desktop (GNOME 46, gdm3), Ubuntu 24.04.5, kernel 6.8.0-147-generic",
        "notes": "Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot."
      },
      {
        "date": "2026-10-19",
        "by": "Sn0wAlice",
        "versions": [
          "26.04"
        ],
        "environment": "Proxmox VM with Ubuntu Desktop (GNOME 50, gdm3), Ubuntu 26.04.1, kernel 7.0.0-38-generic",
        "notes": "Generated dconf check and fix (desktop-hardened); value and lock confirmed with gsettings get/writable as a user under dbus-run-session (write refused); second remediation reported compliant; state kept after reboot."
      }
    ],
    "introduced_in": "0.1.0",
    "created": "2026-10-19",
    "updated": "2026-10-19"
  }
}