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.
(cherry picked from commit f93d40bade)
pull/16211/head
parent
87afec25c5
commit
537e6ef154
Loading…
Reference in New Issue