Ferritaas Incident Intelligence
Defect Intelligence Report Bug 0879401 Severity: High (P2)

SNMP Subagent (snmpd) MIB Polling Deadlock Freezing NMS Telemetry

High-frequency SNMP bulk polling of connection session tables triggers a mutual exclusion deadlock in the FortiOS snmpd worker process, causing NMS telemetry blackouts and false outage alarms across enterprise monitoring systems.

Technical Root Cause Analysis

Enterprise Network Management Systems (such as Zabbix, PRTG, SolarWinds, Datadog, and Prometheus SNMP Exporter) monitor FortiGate health by polling the FORTINET-FORTIGATE-MIB. Tables such as fgSysSesCount, fgSessionTable, and fgFwPolStats require the SNMP subagent daemon (snmpd) to iterate across the kernel's active flow session tracking table.

In FortiOS 7.2.2 through 7.2.6, when an NMS performs high-frequency GET-BULK or GET-NEXT sweeps (e.g. 30-second cycles) during heavy network load, snmpd attempts to acquire read locks on kernel session nodes while kernel packet workers hold exclusive write locks. A mutual exclusion lock inversion occurs inside the MIB iterator callback (fgt_snmp_session_iter), causing the snmpd process to stall indefinitely in an uninterruptible sleep state (Linux D-state). Once stalled, the daemon stops responding to all incoming SNMP requests. Monitoring platforms report the firewall as completely dead, triggering false-positive alerts even though firewall traffic forwarding, routing, and ASICs operate completely unimpaired.

[snmpd 1944] snmp_bulk_walk: OID .1.3.6.1.4.1.12356.101.4.1.8 requested by 10.100.1.50 [snmpd 1944] acquire_kernel_session_lock: waiting for mutex 0xffff8801b0f1a000 (held by flow_worker_0) [snmpd 1944] deadlock: timeout waiting for session table mutex (elapsed=30000ms) [kernel] INFO: task snmpd:1944 blocked for more than 120 seconds. [kernel] Call Trace: [kernel] [<ffffffff8172c918>] schedule_preempt_disabled+0x18/0x30 [kernel] [<ffffffff8172e505>] __mutex_lock_slowpath+0xd5/0x1d0 [kernel] [<ffffffff8172e61a>] mutex_lock+0x1a/0x30 [kernel] [<ffffffffa031940e>] fgt_snmp_session_iter+0x4e/0x120 [fortios_core]

Affected Firmware & Blast Radius Matrix

FortiOS Branch Vulnerable Builds Confirmed Clean Build Status & Workaround
FortiOS 7.2 7.2.2 – 7.2.6 7.2.7+ Filter fgSessionTable OIDs & restart snmpd
FortiOS 7.4 7.4.0 7.4.1+ Non-blocking asynchronous MIB walker active
FortiOS 7.0 Not Affected 7.0.x Branch Clean Uses legacy single-threaded session reader

Platform Impact: Affects all FortiGate models monitored via SNMPv2c/v3 in environments with high session churn (>100k active sessions) and aggressive polling intervals.

Step 01: Free Verification CLI (Safe Read-Only)

Run these diagnostic commands to verify whether the SNMP daemon is locked in D-state, check process memory, and inspect runtime statistics:

Diagnostic Commands

# 1. Verify SNMP daemon status, contact, and engine uptime
diagnose snmp sysinfo

# 2. Check snmpd memory consumption and worker thread count
diagnose sys top-mem 10 | grep snmpd

# 3. Check snmpd process state and PID to detect stuck D-state workers
diagnose sys process pidof snmpd

# 4. Dump snmpd internal runtime statistics and request counters
diagnose test application snmpd 1

Remediation & Workaround Steps (Teaser Preview)

Access the complete non-disruptive daemon recycling and MIB optimization guide inside the Ferrite interactive platform:

Step 02: Identify Aggressive NMS OID Walk Queries

Audit NMS polling profiles to locate high-frequency queries targeting full session table traversal.

🔒 Interactive CLI Available in Ferrite Runbook #04

Step 03: Surgical Worker Termination & In-Memory Lock Release

Safely terminate the deadlocked snmpd process to release kernel locks without impacting data-plane traffic.

🔒 Interactive CLI Available in Ferrite Runbook #04

Step 04: Restrict High-Risk MIB Views & Optimize NMS Polling

Configure custom SNMP MIB views to block expensive session iteration while preserving system and interface telemetry.

🔒 Interactive CLI Available in Ferrite Runbook #04
⚡ Ferrite Platform Superpowers

Execute the Complete Runbook with Live Browser Automation

Connect to your FortiGate via browser console (Web Serial) or jumpbox SSH bridge, verify SNMP daemon responsiveness in real time, generate automated recovery scripts, and generate TAC P2 evidence packages.

Live Browser Automation Direct terminal interface with real-time daemon process monitoring.
📟
1-Click Tera Term (.ttl) Instant script generation for unfreezing air-gapped monitoring.
🛡️
Zero-Trust Scrubber Strips community strings, SNMPv3 auth keys, and IPs locally.
📄
TAC Escalation Dossier Standardized evidence export with SHA-256 seal.

Frequently Asked Questions

What causes FortiOS Bug 0879401?

During bulk SNMP walks of session tables, a lock collision between the SNMP reader and kernel flow workers deadlocks snmpd, halting all SNMP responses.

Does restarting snmpd cause traffic disruption?

No. snmpd is purely a management telemetry daemon; killing and restarting it has zero impact on packet forwarding, NP7 offload, or firewall sessions.

Which firmware releases resolve Bug 0879401?

The defect is resolved in FortiOS 7.2.7 and 7.4.1+, which replace synchronous kernel locks with non-blocking atomic session snapshots.