6.5medium
Incus: Nil-Pointer Dereference via S3 Bucket Import
- Severity
- 6.5medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.39% (higher than 35% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-fwj8-62r8-8p8mGO-2026-5384
Description
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| lxc incus | < 7.0.0 | CVE List |
| github.com/lxc/incus/v6/cmd/incusd (Go) | up to 6.23.0 | GitHub Advisory Database |
| github.com/lxc/incus (Go) | all versions | Go Vulnerability Database |
| github.com/lxc/incus/v6 (Go) | all versions | Go Vulnerability Database |
| linuxcontainers incus | before 7.0.0 | NVD |
All scores
| GitHub_M | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 6.5medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
Summary
Missing error handling could lead an authenticated Incus user to cause a daemon crash through the import of a truncated storage bucket backup file.
Details
It 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.
This 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.
Affected File: https://github.com/lxc/incus/blob/v6.22.0/…server/storage/s3/transfer_manager.go#L127
The tar-iteration loop only checks for EOF:
Affected Code:
for {
hdr, err := tr.Next()
if err == io.EOF {
break // End of archive.
}
// Skip index.yaml file
if hdr.Name == "backup/index.yaml" {
When tr.Next() returns a non-EOF error, hdr is nil. The code does not check for this case and immediately dereferences hdr.Name.
This was confirmed as follows:
Command:
go test ./test/fuzz -run='FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar' -count=1 -v
Output:
=== RUN FuzzS3BucketUploadTarParsing
=== RUN FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar
s3_bucket_upload_fuzz_test.go:82: UploadAllFiles panicked: runtime error: invalid memory address
or nil pointer dereference
--- FAIL: FuzzS3BucketUploadTarParsing/s3_nil_deref_truncated_tar (0.00s)
FAIL
It is recommended to add a non-EOF error check after tr.Next().
Proposed Fix:
hdr, err := tr.Next()
if err == io.EOF {
break
}
if err != nil {
return fmt.Errorf("Error reading backup archive: %w", err)
}
A patch is available at https://github.com/lxc/incus/releases/tag/v7.0.0.
Credits
This issue was discovered and reported by the team at 7asecurity (https://7asecurity.com/)
Go Vulnerability Database
Incus has Nil-Pointer Dereference via S3 Bucket Import in github.com/lxc/incus
NVD (es)
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.
References
| https://github.com/lxc/incus/security/advisories/GHSA-fwj8-62r8-8p8m | advisory, exploit, mitigation, vendor-advisory, web | |
| https://github.com/lxc/incus/releases/tag/v7.0.0 | patch, product, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-41647 | advisory | |
| https://github.com/lxc/incus | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-41647 changed 2026-05-07 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-fwj8-62r8-8p8m changed 2026-06-25 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-5384 changed 2026-06-25 | CC-BY-4.0 |
| NVD | CVE-2026-41647 changed 2026-10-26 | Public domain |