mirror of https://github.com/OISF/suricata
nfs: fix allocation check in LAYOUTGET fh_handles
The check was too weak: it allowed fh_handles far beyond what fits in the remaining input, letting a crafted packet drive a large Vec::with_capacity preallocation in nom7 count(). Bound fh_handles by the remaining input size and by 4096, the maximum file layout stripe count used by the Linux kernel (NFS4_PNFS_MAX_STRIPE_CNT). Ticket: #8816.pull/16213/head
parent
8305ac3028
commit
f93d40bade
Loading…
Reference in New Issue