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

URL Exemption Table Hash Collision Forcing Proxy Worker Heap Growth

Maintaining extensive URL filter exemption tables with over 500 wildcard rules causes degenerate hash collisions in urlfilter, driving proxy worker processes into exponential CPU thrashing and memory conserve mode.

Technical Root Cause Analysis

The FortiOS Web Filter engine relies on the urlfilter daemon to match requested URLs against category rules, blacklists, and exemption tables. When URLs are added as exemptions (action=exempt), the daemon indexes patterns into an internal hash table (hash_tbl) to achieve fast O(1) matching during live proxy traffic.

In FortiOS versions 7.2.1 through 7.2.5, this hash table had a static allocation of only 256 buckets with a simplistic modulus hashing algorithm. In enterprise deployments where security administrators populated the table with over 500 wildcard domain rules (e.g. *.cdn.*.internal or *vendor-api*.com), the hash algorithm produced severe clustering collisions. Over 80% of configured rules fell into a handful of overloaded buckets, degrading lookups to an O(n) linear search. Under high web concurrency, worker threads spent excessive CPU cycles traversing linked list pointers, allocating temporary heap buffers without releasing them, eventually consuming available RAM and triggering FortiOS conserve mode.

[urlfilter_hash] warning: bucket collision threshold exceeded (bucket=42, entries=184) [urlfilter_hash] total table size=256 buckets, total entries=714 (imbalance factor=8.4) [wad_worker_01] linear traversal latency: 42ms per URL lookup [memory_manager] heap growth detected: urlfilter memory: 1,482 MB (threshold=80%) Log ID 0100032001: The system entered conserve mode (total RAM used: 88%) Action: AV/WAD fails open or drops proxy connections

Affected Firmware & Blast Radius Matrix

FortiOS Branch Vulnerable Builds Confirmed Clean Build Status & Workaround
FortiOS 7.2 7.2.1 – 7.2.5 7.2.6+ Consolidate wildcard rules / Upgrade
FortiOS 7.4 7.4.0 7.4.1+ Murmur3 dynamic hash table added
FortiOS 7.0 7.0.4 – 7.0.12 7.0.13+ Prune exemption table below 300 rules

Platform Impact: Mid-range enterprise firewalls (FG-100F, FG-200F, FG-400F) supporting large active user populations with extensive URL filtering exemption lists.

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

Run these diagnostic commands to inspect the urlfilter process memory, check conserve mode status, and review active exemption rules:

Diagnostic Commands

# 1. Query urlfilter daemon memory, hash table stats, and worker health
diagnose test application urlfilter 1

# 2. View top memory consumers to identify urlfilter heap bloat
diagnose sys top-mem 10

# 3. Check current system conserve mode status and thresholds
diagnose hardware sysinfo conserve

# 4. Count the total number of URL filter exemption rules configured
show webfilter urlfilter | grep -c "set url"

Remediation & Workaround Steps (Teaser Preview)

Recover available RAM and exit conserve mode without losing web security controls:

Step 02: Flush Active URL Filter Cache & Temporary Tables

Execute an immediate diagnostic cache clear to release fragmented heap buffers.

🔒 Interactive CLI Available in Ferrite Runbook #01

Step 03: Consolidate Redundant Wildcards into Local Categories

Replace hundreds of wildcard string rules with high-performance FortiGuard Local Category overrides.

🔒 Interactive CLI Available in Ferrite Runbook #01

Step 04: Restructure Inspection to Flow Mode

Transition saturated proxy policies to flow-based inspection to eliminate user-space WAD hash tables.

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

Execute the Complete Runbook with Live Browser Automation

Connect your FortiGate via browser console (Web Serial) or local SSH bridge, verify each command in real-time, generate ready-to-run Tera Term scripts, and export sanitized TAC dossiers.

Live Browser Automation Direct terminal connection with live step checkoff.
📟
1-Click Tera Term (.ttl) Generate scripts for air-gapped jumpboxes.
🛡️
Zero-Trust Scrubber Scrub serials and credentials in local browser RAM.
📄
TAC P1 Escalation Dossier Standardized evidence export with SHA-256 seal.

Frequently Asked Questions

What causes the URL exemption table to consume excessive memory?

In FortiOS 7.2.1–7.2.5, the urlfilter subsystem allocated a static 256-bucket hash table for exempt URLs. When configurations exceeded 500 wildcard entries, hash collisions forced hundreds of rules into the same linked list buckets. High traffic volumes forced repetitive O(n) linear traversals, leading to memory fragmentation and unbounded heap expansion in the WAD worker pool.

How do I know if my FortiGate is in conserve mode from this bug?

Executing 'diagnose sys top-mem' will reveal urlfilter and wad worker processes consuming more than 60-70% of total physical RAM, accompanied by Log ID 0100032001 (system entered conserve mode).

Is there an immediate CLI command to flush the overgrown hash table?

Running 'diagnose test application urlfilter 2' flushes the active URL rating and exemption caches, momentarily freeing memory without requiring a full unit reboot.