summaryrefslogtreecommitdiffstats
path: root/tools/include/uapi
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2021-08-01 08:25:31 +0200
committerDavid S. Miller <davem@davemloft.net>2021-08-03 12:43:43 +0200
commitae954bbc451d267f7d60d7b49db811d5a68ebd7b (patch)
tree288eceb509a67b43dec0a62a794bf5c436adac32 /tools/include/uapi
parentnet: really fix the build... (diff)
downloadlinux-ae954bbc451d267f7d60d7b49db811d5a68ebd7b.tar.xz
linux-ae954bbc451d267f7d60d7b49db811d5a68ebd7b.zip
sctp: move the active_key update after sh_keys is added
In commit 58acd1009226 ("sctp: update active_key for asoc when old key is being replaced"), sctp_auth_asoc_init_active_key() is called to update the active_key right after the old key is deleted and before the new key is added, and it caused that the active_key could be found with the key_id. In Ying Xu's testing, the BUG_ON in sctp_auth_asoc_init_active_key() was triggered: [ ] kernel BUG at net/sctp/auth.c:416! [ ] RIP: 0010:sctp_auth_asoc_init_active_key.part.8+0xe7/0xf0 [sctp] [ ] Call Trace: [ ] sctp_auth_set_key+0x16d/0x1b0 [sctp] [ ] sctp_setsockopt.part.33+0x1ba9/0x2bd0 [sctp] [ ] __sys_setsockopt+0xd6/0x1d0 [ ] __x64_sys_setsockopt+0x20/0x30 [ ] do_syscall_64+0x5b/0x1a0 So fix it by moving the active_key update after sh_keys is added. Fixes: 58acd1009226 ("sctp: update active_key for asoc when old key is being replaced") Reported-by: Ying Xu <yinxu@redhat.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/include/uapi')
0 files changed, 0 insertions, 0 deletions