Skip to content

In GDAL 3.1.0 through 3.13.0, scanForGeometryContainers in the netCDF driver … #525297

Description

@nixpkgs-security-tracker

Description

In GDAL 3.1.0 through 3.13.0, scanForGeometryContainers in the netCDF driver allows code execution via a stack-based buffer overflow. It reads a geometry attribute into a fixed-size stack buffer without validating the attribute length. The attacker embeds the exploit as an oversized geometry attribute in a crafted NetCDF file. This achieves arbitrary code execution on the server running GDAL. This is in frmts/netcdf/netcdfsg.cpp.

References

7.4 HIGH | CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
  • CVSS version (CVSS): 3.1
  • Attack Vector (AV): Local (L)
  • Attack Complexity (AC): High (H)
  • Privileges Required (PR): None (N)
  • User Interaction (UI): None (N)
  • Scope (S): Unchanged (U)
  • Confidentiality (C): High (H)
  • Integrity (I): High (H)
  • Availability (A): High (H)
  • Modified Attack Vector (MAV): Local (L)
  • Modified Attack Complexity (MAC): High (H)
  • Modified Privileges Required (MPR): None (N)
  • Modified User Interaction (MUI): None (N)
  • Modified Confidentiality (MC): High (H)
  • Modified Scope (MS): Unchanged (U)
  • Modified Integrity (MI): High (H)
  • Modified Availability (MA): High (H)
Affected packages

Additional comment

Patch: https://github.com/OSGeo/gdal/commit/c49254dc6380af2f02ff43ca79e3cf7c1bc82f01 (master)
Patch: https://github.com/OSGeo/gdal/commit/50eea7456d83c9586f112ef96b43249372839dea (3.13)

Activity

  1. added
    1.severity: security
    on May 28, 2026
  2. linked a pull request that will close this issuegdal: 3.12.4 -> 3.13.1 #518799on May 28, 2026
  3. LeSuisse commented on Jul 17, 2026

    @LeSuisse
    Member

    @NixOS/geospatial 3.13.1 was landed on unstable but from what I can see 26.05 is still at 3.12.4 and was not patched for this issue. Is it fine to backport the upgrade to 3.13.1 or do we need to patch the 3.12.4 version we have in 26.05?

  4. autra commented on Jul 17, 2026

    @autra
    Contributor

    I've asked upstream. If upstream doesn't backport, I'd be in favor of backporting 3.13, if it doesn't cause other issues.

  5. autra commented on Jul 17, 2026

    @autra
    Contributor

    Answer : "The only maintained branch currently is 3.13". So I'd vote for a backport of 3.13, but I guess we can also maintain that patch on top of 3.12 if it applies cleanly. WDYT @imincik?

  6. imincik commented on Jul 20, 2026

    @imincik
    Contributor

    Answer : "The only maintained branch currently is 3.13". So I'd vote for a backport of 3.13, but I guess we can also maintain that patch on top of 3.12 if it applies cleanly. WDYT @imincik?

    I would prefer patch for 3.12. I recently added few patches

  7. added a commit that references this issue on Jul 20, 2026
    6bc4798
  8. imincik commented on Jul 20, 2026

    @imincik
    Contributor

    @LeSuisse @autra , please review #543748

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.severity: security

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions