{"id":"CVE-2026-41647","aliases":["CVE-2026-41647","GHSA-fwj8-62r8-8p8m","GO-2026-5384"],"related":[],"kind":"vulnerability","state":"published","title":"Incus: Nil-Pointer Dereference via S3 Bucket Import","summary":"Incus is a system container and virtual machine manager. Prior to version 7.0.0, a missing error handling could lead an authenticated Incus user to cause a daemon crash through the import of a truncated storage bucket backup file. This issue has been patched in version 7.0.0.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Incus is a system container and virtual machine manager. Prior to version 7.0.0, a missing error handling could lead an authenticated Incus user to cause a daemon crash through the import of a truncated storage bucket backup file. This issue has been patched in version 7.0.0.","source":"cvelist"},{"lang":"en","text":"### Summary\nMissing error handling could lead an authenticated Incus user to cause a daemon crash through the import of a truncated storage bucket backup file.\n\n### Details\nIt was found that TransferManager.UploadAllFiles iterates over tar entries but only checks for io.EOF from tr.Next(). When tr.Next() returns a non-EOF error, such as unexpected EOF from a truncated archive, the header hdr is nil and the code continues to access hdr.Name, causing a nil-pointer dereference that panics the daemon.\n\nThis may allow the Incus daemon to be crashed during S3 bucket restore if a truncated or corrupted backup archive is provided. A panic can occur when a malformed archive produces a non-EOF tar read error after the first entry. Any caller of UploadAllFiles that processes attacker-controlled archive content may be affected.\n\nAffected File:\n[https://github.com/lxc/incus/blob/v6.22.0/…server/storage/s3/transfer_manager.go#L127](https://github.com/lxc/incus/blob/v6.22.0/internal/server/storage/s3/transfer_manager.go#L127) \n\nThe tar-iteration loop only checks for EOF:\n\nAffected Code:\n```\nfor {\n    hdr, err := tr.Next()\n    if err == io.EOF {\n        break // End of archive.\n    }\n\n    // Skip index.yaml file\n    if hdr.Name == \"backup/index.yaml\" {\n```\n\nWhen tr.Next() returns a non-EOF error, hdr is nil. The code does not check for this case and immediately dereferences hdr.Name.\n\nThis was confirmed as follows:\n\nCommand:\n```\ngo test ./test/fuzz -run='FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar' -count=1 -v\n```\n\nOutput:\n```\n=== RUN   FuzzS3BucketUploadTarParsing\n=== RUN   FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar\n   s3_bucket_upload_fuzz_test.go:82: UploadAllFiles panicked: runtime error: invalid memory address\n       or nil pointer dereference\n--- FAIL: FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar (0.00s)\nFAIL\n```\n\nIt is recommended to add a non-EOF error check after tr.Next().\n\nProposed Fix:\n```\nhdr, err := tr.Next()\nif err == io.EOF {\n    break\n}\n\nif err != nil {\n    return fmt.Errorf(\"Error reading backup archive: %w\", err)\n}\n```\n\nA patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0.\n\n### Credits\nThis issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Incus has Nil-Pointer Dereference via S3 Bucket Import in github.com/lxc/incus","format":"markdown","source":"go"},{"lang":"es","text":"Incus es un gestor de contenedores de sistema y máquinas virtuales. Antes de la versión 7.0.0, una falta de manejo de errores podría permitir a un usuario autenticado de Incus provocar una caída del demonio mediante la importación de un archivo de copia de seguridad de un bucket de almacenamiento truncado. Este problema ha sido parcheado en la versión 7.0.0.","source":"nvd"}],"published":"2026-05-04T19:38:48.000Z","modified":"2026-10-26T21:10:00.170Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"version":"< 7.0.0","status":"affected"}],"vendor":"lxc","product":"incus","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"6.23.0"}],"ecosystem":"Go","package":"github.com/lxc/incus/v6/cmd/incusd","purl":"pkg:golang/github.com/lxc/incus/v6/cmd/incusd","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/lxc/incus","purl":"pkg:golang/github.com/lxc/incus","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/lxc/incus/v6","purl":"pkg:golang/github.com/lxc/incus/v6","source":"go"},{"ranges":[{"status":"affected","fixed":"7.0.0"}],"vendor":"linuxcontainers","product":"incus","cpe":"cpe:2.3:a:linuxcontainers:incus:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/lxc/incus/security/advisories/GHSA-fwj8-62r8-8p8m","tags":["advisory","exploit","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/lxc/incus/releases/tag/v7.0.0","tags":["patch","product","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41647","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/lxc/incus","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-07T13:54:21.594Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-41647","url":"https://www.cve.org/CVERecord?id=CVE-2026-41647","licence":"CVE Terms of Use","modified":"2026-05-07T13:54:39.907Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-fwj8-62r8-8p8m","url":"https://github.com/advisories/GHSA-fwj8-62r8-8p8m","licence":"CC-BY-4.0","modified":"2026-06-25T23:11:43.584Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5384","url":"https://pkg.go.dev/vuln/GO-2026-5384","licence":"CC-BY-4.0","modified":"2026-06-25T23:01:11.849Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-41647","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-41647","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"}],"updatedAt":"2026-11-25T22:59:20.882Z","epss":{"score":0.00394,"percentile":0.35754,"date":"2026-12-01T12:00:22.000Z"}}