diff options
author | Florian Westphal <fw@strlen.de> | 2024-01-19 13:34:32 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-01-24 20:02:30 +0100 |
commit | b462579b2b86a8f5230543cadd3a4836be27baf7 (patch) | |
tree | 76e334ac0e22c3dea0a0c955a495ffda0d6c6bd7 /drivers/ata/sis.h | |
parent | c9d9eb9c53d37cdebbad56b91e40baf42d5a97aa (diff) |
netfilter: nf_tables: restrict anonymous set and map names to 16 bytes
nftables has two types of sets/maps, one where userspace defines the
name, and anonymous sets/maps, where userspace defines a template name.
For the latter, kernel requires presence of exactly one "%d".
nftables uses "__set%d" and "__map%d" for this. The kernel will
expand the format specifier and replaces it with the smallest unused
number.
As-is, userspace could define a template name that allows to move
the set name past the 256 bytes upperlimit (post-expansion).
I don't see how this could be a problem, but I would prefer if userspace
cannot do this, so add a limit of 16 bytes for the '%d' template name.
16 bytes is the old total upper limit for set names that existed when
nf_tables was merged initially.
Fixes: 387454901bd6 ("netfilter: nf_tables: Allow set names of up to 255 chars")
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'drivers/ata/sis.h')
0 files changed, 0 insertions, 0 deletions