BACnet Stack: Undefined-behavior signed left shift in `decode_signed32()`
BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to 1.4.3, decode_signed32() in src/bacnet/bacint.c reconstructs a 32-bit signed integer from four APDU bytes using signed left shifts. When any of the four bytes has bit 7 set (value ≥ 0x80), the left-shift operation overflows a signed int32_t, which is undefined behavior per the C standard. This is flagged thousands of times per minute by UndefinedBehaviorSanitizer on any BACnet input containing signed-integer property values with high-bit-set bytes. This vulnerability is fixed in 1.4.3.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2026-40279
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 4 Nov 2026, 16:37 UTC · Revision 1
Source evidence
BACnet Stack: Undefined-behavior signed left shift in `decode_signed32()`
core-osv · Original sourcePublished 21 Apr 2026, 16:29 UTC
BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to 1.4.3, decode_signed32() in src/bacnet/bacint.c reconstructs a 32-bit signed integer from four APDU bytes using signed left shifts. When any of the four bytes has bit 7 set (value ≥ 0x80), the left-shift operation overflows a signed int32_t, which is undefined behavior per the C standard. This is flagged thousands of times per minute by UndefinedBehaviorSanitizer on any BACnet input containing signed-integer property values with high-bit-set bytes. This vulnerability is fixed in 1.4.3.
osv:CVE-2026-40279
Complete source record
{
"id": "480d62e97315ce166fc4313e6a305d470c7c154bc735e0642183d665d66bd512",
"url": "https://osv.dev/vulnerability/CVE-2026-40279",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "BACnet Stack: Undefined-behavior signed left shift in `decode_signed32()`",
"summary": "BACnet Stack is a BACnet open source protocol stack C library for embedded systems. Prior to 1.4.3, decode_signed32() in src/bacnet/bacint.c reconstructs a 32-bit signed integer from four APDU bytes using signed left shifts. When any of the four bytes has bit 7 set (value ≥ 0x80), the left-shift operation overflows a signed int32_t, which is undefined behavior per the C standard. This is flagged thousands of times per minute by UndefinedBehaviorSanitizer on any BACnet input containing signed-integer property values with high-bit-set bytes. This vulnerability is fixed in 1.4.3.",
"evidence": "osv:CVE-2026-40279",
"products": [],
"severity": "low",
"structured": {
"id": "CVE-2026-40279",
"aliases": [
"CVE-2026-40279",
"GHSA-326g-j95f-gmxv"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:L"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/bacnet-stack/bacnet-stack",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "6d2d251ca4f4d932664add702b236279863d630a"
}
],
"database_specific": {
"extracted_events": [
{
"range": [
{
"introduced": "0"
},
{
"fixed": "1.4.3"
}
],
"source": "AFFECTED_FIELD",
"strategy": "StringRangeExpression"
},
{
"cpe": "cpe:2.3:a:bacnetstack:bacnet_stack:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "1.4.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"bacnet-stack-1.4.0",
"bacnet-stack-1.3.8",
"bacnet-stack-1.3.7",
"bacnet-stack-1.3.6",
"bacnet-stack-1.3.5",
"bacnet-stack-1.3.4",
"bacnet-stack-1.3.3",
"bacnet-stack-1.3.2",
"bacnet-stack-1.3.1",
"bacnet-stack-1.3.0",
"bacnet-stack-1.2.0",
"bacnet-stack-1.1.1",
"bacnet-stack-1.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-40279.json"
}
}
],
"modified": "2026-10-28T02:30:37.632468571Z",
"provider": "osv",
"references": [
"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40279.json",
"https://github.com/bacnet-stack/bacnet-stack/security/advisories/GHSA-326g-j95f-gmxv",
"https://nvd.nist.gov/vuln/detail/CVE-2026-40279"
],
"provider_metadata": {
"cwe_ids": [
"CWE-758"
],
"cna_assigner": "GitHub_M",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/40xxx/CVE-2026-40279.json"
}
},
"related_cves": [
{
"value": "CVE-2026-40279",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 504769,
"published_at": "2026-04-21T16:29:16.125+00:00"
}