{"id":"UBUNTU-CVE-2024-45158","details":"An issue was discovered in Mbed TLS 3.6 before 3.6.1. A stack buffer overflow in mbedtls_ecdsa_der_to_raw() and mbedtls_ecdsa_raw_to_der() can occur when the bits parameter is larger than the largest supported curve. In some configurations with PSA disabled, all values of bits are affected. (This never happens in internal library calls, but can affect applications that call these functions directly.)","modified":"2025-09-08T17:03:08Z","published":"2024-09-05T19:15:00Z","withdrawn":"2025-10-10T15:21:25Z","upstream":["CVE-2024-45158"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-45158"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-45158"},{"type":"REPORT","url":"https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2024-08-2/"},{"type":"REPORT","url":"https://mbed-tls.readthedocs.io/en/latest/security-advisories/"},{"type":"REPORT","url":"https://github.com/Mbed-TLS/mbedtls/releases/"}],"affected":[{"package":{"name":"mbedtls","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/mbedtls@2.2.1-2ubuntu0.3?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.1.2-1","2.2.0-1","2.2.1-1","2.2.1-2","2.2.1-2ubuntu0.1","2.2.1-2ubuntu0.2","2.2.1-2ubuntu0.3"],"ecosystem_specific":{"binaries":[{"binary_name":"libmbedcrypto0","binary_version":"2.2.1-2ubuntu0.3"},{"binary_version":"2.2.1-2ubuntu0.3","binary_name":"libmbedtls-dev"},{"binary_name":"libmbedtls10","binary_version":"2.2.1-2ubuntu0.3"},{"binary_name":"libmbedx509-0","binary_version":"2.2.1-2ubuntu0.3"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}},{"package":{"name":"mbedtls","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/mbedtls@2.8.0-1?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.5.1-1ubuntu1","2.6.0-1","2.7.0-2","2.8.0-1"],"ecosystem_specific":{"binaries":[{"binary_version":"2.8.0-1","binary_name":"libmbedcrypto1"},{"binary_name":"libmbedtls-dev","binary_version":"2.8.0-1"},{"binary_name":"libmbedtls10","binary_version":"2.8.0-1"},{"binary_name":"libmbedx509-0","binary_version":"2.8.0-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}},{"package":{"name":"mbedtls","ecosystem":"Ubuntu:Pro:20.04:LTS","purl":"pkg:deb/ubuntu/mbedtls@2.16.4-1ubuntu2?arch=source&distro=esm-apps/focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.16.2-1","2.16.3-1","2.16.4-1ubuntu2"],"ecosystem_specific":{"binaries":[{"binary_version":"2.16.4-1ubuntu2","binary_name":"libmbedcrypto3"},{"binary_name":"libmbedtls-dev","binary_version":"2.16.4-1ubuntu2"},{"binary_name":"libmbedtls12","binary_version":"2.16.4-1ubuntu2"},{"binary_name":"libmbedx509-0","binary_version":"2.16.4-1ubuntu2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}},{"package":{"name":"mbedtls","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/mbedtls@2.28.0-1build1?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.16.9-0.1ubuntu1","2.16.11-0.1ubuntu1","2.16.11-0.3","2.28.0-1","2.28.0-1build1"],"ecosystem_specific":{"binaries":[{"binary_name":"libmbedcrypto7","binary_version":"2.28.0-1build1"},{"binary_name":"libmbedtls-dev","binary_version":"2.28.0-1build1"},{"binary_name":"libmbedtls14","binary_version":"2.28.0-1build1"},{"binary_name":"libmbedx509-1","binary_version":"2.28.0-1build1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}},{"package":{"name":"mbedtls","ecosystem":"Ubuntu:24.04:LTS","purl":"pkg:deb/ubuntu/mbedtls@2.28.8-1?arch=source&distro=noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.28.3-1","2.28.6-1ubuntu1","2.28.7-1ubuntu1","2.28.7-1.1ubuntu1","2.28.8-1"],"ecosystem_specific":{"binaries":[{"binary_name":"libmbedcrypto7t64","binary_version":"2.28.8-1"},{"binary_name":"libmbedtls-dev","binary_version":"2.28.8-1"},{"binary_name":"libmbedtls14t64","binary_version":"2.28.8-1"},{"binary_name":"libmbedx509-1t64","binary_version":"2.28.8-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}},{"package":{"name":"mbedtls","ecosystem":"Ubuntu:25.04","purl":"pkg:deb/ubuntu/mbedtls@3.6.2-3ubuntu1?arch=source&distro=plucky"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["2.28.8-1","3.6.2-1ubuntu4","3.6.2-2ubuntu1","3.6.2-3ubuntu1"],"ecosystem_specific":{"binaries":[{"binary_name":"libmbedcrypto16","binary_version":"3.6.2-3ubuntu1"},{"binary_name":"libmbedtls-dev","binary_version":"3.6.2-3ubuntu1"},{"binary_name":"libmbedtls21","binary_version":"3.6.2-3ubuntu1"},{"binary_name":"libmbedx509-7","binary_version":"3.6.2-3ubuntu1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-45158.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"},{"type":"Ubuntu","score":"medium"}]}