]> git.ipfire.org Git - thirdparty/iproute2.git/commit
tipc: bail out if algname is abnormally long
authorAndrea Claudi <aclaudi@redhat.com>
Sat, 1 May 2021 16:32:29 +0000 (18:32 +0200)
committerDavid Ahern <dsahern@kernel.org>
Sun, 9 May 2021 22:08:47 +0000 (22:08 +0000)
commit93c267bfb49267fd94f68c3d014fc5909645de06
tree854a392d5ab595764c0dad0aff00df3abffdd68b
parent459f280813e9328f280f85c1880882dc3c600307
tipc: bail out if algname is abnormally long

tipc segfaults when called with an abnormally long algname:

$ tipc node set key 0x1234 algname supercalifragilistichespiralidososupercalifragilistichespiralidoso
*** buffer overflow detected ***: terminated

Fix this returning an error if provided algname is longer than
TIPC_AEAD_ALG_NAME.

Fixes: 24bee3bf9752 ("tipc: add new commands to set TIPC AEAD key")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
tipc/node.c