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

tipc segfaults when called with an abnormally long key:

$ tipc node set key 0123456789abcdef0123456789abcdef0123456789abcdef
*** buffer overflow detected ***: terminated

Fix this returning an error if key length is longer than
TIPC_AEAD_KEYLEN_MAX.

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/misc.c