BACnet ReadPropertyMultiple request Maximum allowed recursion depth reached
Summary
A BACnet ReadPropertyMultiple request which includes ALL properties of a device and an APDU size of 1476 produces the error "Maximum allowed recursion depth reached. Dissection stopped."
Note: the error is generated in epan/dissectors/packet-bacapp.c
:
#define BACAPP_MAX_RECURSION_DEPTH 50 // Arbitrary
Sample capture file
Steps to reproduce
Open the capture file, and observe the error "Maximum allowed recursion depth reached. Dissection stopped." for the Complex-ACK of ReadPropertyMultiple packet (No. 6, No. 12) "Building Automation and Control Network APDU" dissection.
What is the current bug behavior?
The error "Maximum allowed recursion depth reached. Dissection stopped." occurs in the "Building Automation and Control Network APDU" dissection layer.
What is the expected correct behavior?
Expected that additional ReadPropertyMultiple properties are decoded and displayed as each open/close context 4 tags (0x4e, 0x4f) are encountered in the packet.
ASN.1 for ReadPropertyMultiple-ACK:
ReadPropertyMultiple-ACK ::= SEQUENCE {
list-of-read-access-results SEQUENCE OF ReadAccessResult
}
ReadAccessResult ::= SEQUENCE {
object-identifier [0] BACnetObjectIdentifier,
list-of-results [1] SEQUENCE OF SEQUENCE {
property-identifier [2] BACnetPropertyIdentifier,
property-array-index [3] Unsigned OPTIONAL,
-- used only with array datatype
-- if omitted with an array the entire
-- array is referenced
read-result CHOICE {
property-value [4] ABSTRACT-SYNTAX.&Type,
property-access-error [5] Error
}
}
}
Build information
Version 4.4.1 (v4.4.1-0-g575b2bf4746e).
Compiled (64-bit) using Microsoft Visual Studio 2022 (VC++ 14.41, build 34123),
with GLib 2.78.4, with Qt 6.5.3, with libpcap, with zlib 1.3.1, with zlib-ng
2.1.5, with PCRE2, with Lua 5.4.6 (with UfW patches), with GnuTLS 3.8.4 and PKCS
#11 support, with Gcrypt 1.10.2-unknown, with Kerberos (MIT), with MaxMind, with
nghttp2 1.62.1, with nghttp3 0.14.0, with brotli, with LZ4, with Zstandard, with
Snappy, with libxml2 2.11.7, with libsmi 0.5.0, with Minizip-ng , with
QtMultimedia, with automatic updates using WinSparkle 0.8.0, with AirPcap, with
binary plugins.
Running on 64-bit Windows 10 (22H2), build 19045, with 12th Gen Intel(R)
Core(TM) i7-12850HX (with SSE4.2), with 65220 MB of physical memory, with GLib
2.78.4, with Qt 6.5.3, with Npcap version 1.75, based on libpcap version 1.10.4,
with PCRE2 10.43 2024-02-16, with c-ares 1.27.0, with GnuTLS 3.8.4, with Gcrypt
1.10.2-unknown, with nghttp2 1.62.1, with nghttp3 0.14.0, with brotli 1.0.9,
with LZ4 1.9.4, with Zstandard 1.5.6, without AirPcap, with light display mode,
without HiDPI, with QPA plugin "windows", with LC_TYPE=English_United
States.utf8, binary plugins supported.