SNMP trapper drops subsequent traps after NUL byte in trap value

XMLWordPrintable

    • Type: Problem report
    • Resolution: Unresolved
    • Priority: Trivial
    • None
    • Affects Version/s: 7.0.27
    • Component/s: Server (S)
    • None

      Steps to reproduce:

      1. Create a host with SNMP interface with IP of 192.0.2.77 and an snmptrap.fallback item
      2. Add three trap entries to the trap file
        printf '10:00:01 2026/06/24 ZBXTRAP 192.0.2.77\nVARBINDS:\n  .1.3.6.1.4.1.2011.2.251.20.1.3.10.0 type=4 value=STRING: "trap-1"\n\n' >> /var/lib/zabbix/snmptraps/snmptraps.log
        printf '10:00:02 2026/06/24 ZBXTRAP 192.0.2.77\nVARBINDS:\n  .1.3.6.1.4.1.2011.2.251.20.1.3.10.0 type=4 value=STRING: "trap-2-\0-nul"\n\n' >> /var/lib/zabbix/snmptraps/snmptraps.log
        printf '10:00:03 2026/06/24 ZBXTRAP 192.0.2.77\nVARBINDS:\n  .1.3.6.1.4.1.2011.2.251.20.1.3.10.0 type=4 value=STRING: "trap-3"\n\n' >> /var/lib/zabbix/snmptraps/snmptraps.log
        

      Result:
      trap 1: stored
      trap 2: truncated at the NUL byte
      trap 3: lost - absent from Latest Data, no log entry at any debug level

      Expected:
      All three traps stored as values of snmptrap.fallback

            Assignee:
            Zabbix Development Team
            Reporter:
            Michal Kudlacz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: