{"vuln_id":"GHSA-r7w7-mmxr-47r9","aliases":[],"description":null,"published_at":null,"modified_at":null,"first_seen_at":"2026-11-23T21:06:31.530168Z","severity":"unknown","severity_source":null,"cvss_score":null,"cvss_vector":null,"cwe":[],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":null,"epss_percentile":null,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://github.com/advisories/GHSA-r7w7-mmxr-47r9"},"matched_alias":null,"items":[{"id":16565,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-j93m-3j9p-m5m8: LXD has CreateCustomVolumeFromBackup nil-pointer dereference on volumes[0].snapshots[*].expires_at","summary":"LXD has CreateCustomVolumeFromBackup nil-pointer dereference on volumes[0].snapshots[*].expires_at\n\n## Summary\n\n(sibling-field variant of CVE-2026-40197 fix 05bc272)\n\n`(*lxdBackend).CreateCustomVolumeFromBackup` in [`lxd/storage/backend_lxd.go`](https://github.com/canonical/lxd/blob/05bc272/lxd/storage/backend_lxd.go) contains an unguarded `*time.Time` dereference on the `ExpiresAt` field of every volume-snapshot entry in an imported custom-volume backup. An authenticated user with `EntitlementCanCreateStorageVolumes` permission on any project can crash the `lxd` daemon by uploading a backup tarball whose `volumes[0].snapshots[*].expires_at` field is omitted.\n\nThis is a sibling-field variant of the CVE-2026-40197 fix (commit `05bc272`, \"Validate snapshots from backup.yaml are non-nil\", cherry-picked from incus commit `985a1dedf` / GHSA-r7w7-mmxr-47r9). That fix added `if snap == nil` guards at several consumer sites, but did not guard the adjacent `*snapshot.ExpiresAt` deref at line 8216. Every other consumer of this field in the same file already gates the deref with `if … != nil` (e.g. lines 1010-1011, 1274-1275, 1856-1857, 2454-2455, 5070-5071, 5527-5528). Asymmetric guard is the bug.\n\n## Vulnerable code\n\n[`lxd/storage/backend_lxd.go`](https://github.com/canonical/lxd/blob/05bc272/lxd/storage/backend_lxd.go), `CreateCustomVolumeFromBackup`:\n\n```go\n// Line 8141-8150 — earliest snapshot validation pass (caches s == nil)\nfor i, snap := range customVol.Snapshots {\n    if snap == nil {\n        return fmt.Errorf(\"Nil custom volume snapshot definition found at index %d\", i)\n    }\n    err = drivers.ValidVolumeName(snap.Name)\n    ...\n}\n\n// Line 8196-8216 — the snapshot DB-create loop\nfor i, s := range customVol.Snapshots {\n    if s == nil {\n        return fmt.Errorf(\"Nil custom volume snapshot definition found at index %d\", i)\n    }\n    snapshot := s\n    ...\n    // Line 8216 — UNGUARDED *time.Time deref:\n    err = VolumeDBCreate(b, srcBackup.Project, fullSnapName, snapshot.Description,\n        snapVol.Type(), true, snapVol.Config(), snapshot.CreatedAt,\n        *snapshot.ExpiresAt,           // <-- panics when expires_at omitted in YAML\n        snapVol.ContentType(), true, true)\n```\n\n`ExpiresAt` is declared `*time.Time` ([`shared/api/storage_pool_volume_snapshot.go`](https://github.com/canonical/lxd/blob/05bc272/shared/api/storage_pool_volume_snapshot.go)). Every other consumer in the same file already uses the safe pattern (`if … != nil { … = *… }`):\n\n| Line | Code | Guarded? |\n|------|------|----------|\n| 1010-1011 | rootVol.Snapshots[i].ExpiresAt | YES |\n| 1274-1275 | rootVol.Snapshots[i].ExpiresAt | YES |\n| 1558-1559 | srcSnap.ExpiresAt | YES |\n| 1856-1857 | rootVol.Snapshots[i].ExpiresAt | YES |\n| 2454-2455 | rootVol.Snapshots[i].ExpiresAt | YES |\n| 5070-5071 | customVol.Snapshots[i].ExpiresAt | YES |\n| 5527-5528 | srcSnap.ExpiresAt | YES |\n| **8216** | **CreateCustomVolumeFromBackup snapshot.ExpiresAt** | **NO** |\n\n## Reach\n\n1. Attacker is an authenticated client (TLS cert, OIDC, or unix socket) with the `EntitlementCanCreateStorageVolumes` enti\n\nAffected: Go:github.com/canonical/lxd\n\nFixed in: 0.0.0-20260622081844-85f897013ccd\n\nReferences:\nhttps://github.com/canonical/lxd/security/advisories/GHSA-j93m-3j9p-m5m8\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-9639\nhttps://github.com/canonical/lxd/pull/18320\nhttps://github.com/canonical/lxd/pull/18390\nhttps://github.com/canonical/lxd/commit/05bc2729e99707a766d5c4705167a3322c9ef424\nhttps://github.com/canonical/lxd/commit/c7cdfadb6044dfeaac592dc225978b4125ee23fe\nhttps://github.com/canonical/lxd/commit/d15520809e6e2ac2af0c6354dfb7be5854b0e859\nhttps://github.com/CVEProject/cvelistV5/blob/main/cves/2026/9xxx/CVE-2026-9639.json","url":"https://osv.dev/vulnerability/GHSA-j93m-3j9p-m5m8","published_at":"2026-11-06T19:37:14Z","updated_at":"2026-11-23T20:41:29.123766Z","fetched_at":"2026-11-23T21:06:31.109568Z","severity":"high","cvss_score":7.1,"epss":0.00548,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/canonical/lxd","vuln_id":"CVE-2026-9639","vuln_ids":["CVE-2026-40197","CVE-2026-9639","GHSA-J93M-3J9P-M5M8","GHSA-R7W7-MMXR-47R9","GO-2026-6935"],"tags":["osv","go","fix-available"],"cluster_id":14721,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/16565","html":"https://vulnwatch.ve1ve2.com/item/16565"}}]}