{"id":"UBUNTU-CVE-2024-38440","details":"Netatalk before 3.2.1 has an off-by-one error, and resultant heap-based buffer overflow and segmentation violation, because of incorrectly using FPLoginExt in BN_bin2bn in etc/uams/uams_dhx_pam.c. The original issue 1097 report stated: 'The latest version of Netatalk (v3.2.0) contains a security vulnerability. This vulnerability arises due to a lack of validation for the length field after parsing user-provided data, leading to an out-of-bounds heap write of one byte (\\0). Under specific configurations, this can result in reading metadata of the next heap block, potentially causing a Denial of Service (DoS) under certain heap layouts or with ASAN enabled. ... The vulnerability is located in the FPLoginExt operation of Netatalk, in the BN_bin2bn function found in /etc/uams/uams_dhx_pam.c ... if (!(bn = BN_bin2bn((unsigned char *)ibuf, KEYSIZE, NULL))) ... threads ... [#0] Id 1, Name: \"afpd\", stopped 0x7ffff4304e58 in ?? (), reason: SIGSEGV ... [#0] 0x7ffff4304e58 mov BYTE PTR [r14+0x8], 0x0 ... mov rdx, QWORD PTR [rsp+0x18] ... afp_login_ext(obj=\u003coptimized out\u003e, ibuf=0x62d000010424 \"\", ibuflen=0xffffffffffff0015, rbuf=\u003coptimized out\u003e, rbuflen=\u003coptimized out\u003e) ... afp_over_dsi(obj=0x5555556154c0 \u003cobj\u003e).' 2.4.1 and 3.1.19 are also fixed versions.","modified":"2026-03-13T17:23:34.835305Z","published":"2024-06-16T13:15:00Z","related":["USN-7347-1"],"upstream":["CVE-2024-38440"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2024-38440"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2024-38440"},{"type":"REPORT","url":"https://github.com/Netatalk/netatalk/pull/1158"},{"type":"ADVISORY","url":"https://ubuntu.com/security/notices/USN-7347-1"}],"affected":[{"package":{"name":"netatalk","ecosystem":"Ubuntu:Pro:14.04:LTS","purl":"pkg:deb/ubuntu/netatalk@2.2.2-1ubuntu2.2+esm2?arch=source&distro=esm-infra-legacy/trusty"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.2-1ubuntu2.2+esm2"}]}],"versions":["2.2.2-1ubuntu1","2.2.2-1ubuntu2","2.2.2-1ubuntu2.2","2.2.2-1ubuntu2.2+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro with Legacy support add-on: https://ubuntu.com/pro","binaries":[{"binary_name":"netatalk","binary_version":"2.2.2-1ubuntu2.2+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}},{"package":{"name":"netatalk","ecosystem":"Ubuntu:Pro:16.04:LTS","purl":"pkg:deb/ubuntu/netatalk@2.2.5-1ubuntu0.2+esm2?arch=source&distro=esm-apps/xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.5-1ubuntu0.2+esm2"}]}],"versions":["2.2.5-1","2.2.5-1ubuntu0.2","2.2.5-1ubuntu0.2+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"netatalk","binary_version":"2.2.5-1ubuntu0.2+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}},{"package":{"name":"netatalk","ecosystem":"Ubuntu:Pro:18.04:LTS","purl":"pkg:deb/ubuntu/netatalk@2.2.6-1ubuntu0.18.04.2+esm2?arch=source&distro=esm-apps/bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.6-1ubuntu0.18.04.2+esm2"}]}],"versions":["2.2.6-1","2.2.6-1ubuntu0.18.04.2","2.2.6-1ubuntu0.18.04.2+esm1"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"netatalk","binary_version":"2.2.6-1ubuntu0.18.04.2+esm2"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}},{"package":{"name":"netatalk","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/netatalk@3.1.12~ds-4ubuntu0.20.04.4?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.12~ds-4ubuntu0.20.04.4"}]}],"versions":["3.1.12~ds-3","3.1.12~ds-4","3.1.12~ds-4ubuntu0.20.04.1","3.1.12~ds-4ubuntu0.20.04.3"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"netatalk","binary_version":"3.1.12~ds-4ubuntu0.20.04.4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}},{"package":{"name":"netatalk","ecosystem":"Ubuntu:22.04:LTS","purl":"pkg:deb/ubuntu/netatalk@3.1.12~ds-9ubuntu0.22.04.4?arch=source&distro=jammy"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.12~ds-9ubuntu0.22.04.4"}]}],"versions":["3.1.12~ds-9","3.1.12~ds-9build1","3.1.12~ds-9ubuntu0.22.04.1","3.1.12~ds-9ubuntu0.22.04.3"],"ecosystem_specific":{"availability":"No subscription required","binaries":[{"binary_name":"netatalk","binary_version":"3.1.12~ds-9ubuntu0.22.04.4"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}},{"package":{"name":"netatalk","ecosystem":"Ubuntu:Pro:24.04:LTS","purl":"pkg:deb/ubuntu/netatalk@3.1.18~ds-1ubuntu0.1~esm1?arch=source&distro=esm-apps/noble"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"3.1.18~ds-1ubuntu0.1~esm1"}]}],"versions":["3.1.15~ds-1ubuntu1","3.1.18~ds-1","3.1.18~ds-1build2","3.1.18~ds-1build4"],"ecosystem_specific":{"availability":"Available with Ubuntu Pro: https://ubuntu.com/pro","binaries":[{"binary_name":"netatalk","binary_version":"3.1.18~ds-1ubuntu0.1~esm1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2024/UBUNTU-CVE-2024-38440.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}