UBUNTU-CVE-2021-21401

Source
https://ubuntu.com/security/CVE-2021-21401
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2021/UBUNTU-CVE-2021-21401.json
JSON Data
https://api.test.osv.dev/v1/vulns/UBUNTU-CVE-2021-21401
Related
Published
2021-03-23T18:15:00Z
Modified
2025-01-13T10:22:29Z
Severity
  • 7.1 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L CVSS Calculator
Summary
[none]
Details

Nanopb is a small code-size Protocol Buffers implementation in ansi C. In Nanopb before versions 0.3.9.8 and 0.4.5, decoding a specifically formed message can cause invalid free() or realloc() calls if the message type contains an oneof field, and the oneof directly contains both a pointer field and a non-pointer field. If the message data first contains the non-pointer field and then the pointer field, the data of the non-pointer field is incorrectly treated as if it was a pointer value. Such message data rarely occurs in normal messages, but it is a concern when untrusted data is parsed. This has been fixed in versions 0.3.9.8 and 0.4.5. See referenced GitHub Security Advisory for more information including workarounds.

References

Affected packages

Ubuntu:20.04:LTS / nanopb

Package

Name
nanopb
Purl
pkg:deb/ubuntu/nanopb@0.4.1-1?arch=source&distro=focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected

Affected versions

0.*

0.4.1-1

Ecosystem specific

{
    "ubuntu_priority": "medium"
}

Ubuntu:Pro:20.04:LTS / nanopb

Package

Name
nanopb
Purl
pkg:deb/ubuntu/nanopb@0.4.1-1ubuntu0.1~esm1?arch=source&distro=esm-apps/focal

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.4.1-1ubuntu0.1~esm1

Affected versions

0.*

0.4.1-1

Ecosystem specific

{
    "availability": "Available with Ubuntu Pro: https://ubuntu.com/pro",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "0.4.1-1ubuntu0.1~esm1",
            "binary_name": "libnanopb-dev"
        },
        {
            "binary_version": "0.4.1-1ubuntu0.1~esm1",
            "binary_name": "nanopb"
        }
    ]
}

Ubuntu:22.04:LTS / nanopb

Package

Name
nanopb
Purl
pkg:deb/ubuntu/nanopb@0.4.5-2?arch=source&distro=jammy

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.4.5-2

Affected versions

0.*

0.4.4-2
0.4.5-1

Ecosystem specific

{
    "availability": "No subscription required",
    "ubuntu_priority": "medium",
    "binaries": [
        {
            "binary_version": "0.4.5-2",
            "binary_name": "libnanopb-dev"
        },
        {
            "binary_version": "0.4.5-2",
            "binary_name": "nanopb"
        }
    ]
}