]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add
authorMinhong He <heminhong@kylinos.cn>
Fri, 15 Aug 2025 06:38:45 +0000 (14:38 +0800)
committerJakub Kicinski <kuba@kernel.org>
Tue, 19 Aug 2025 00:35:50 +0000 (17:35 -0700)
commit84967deee9d9870b15bc4c3acb50f1d401807902
tree828bbbf7d36a95fdf4dc1a75187c6925ac860b38
parent864e3396976ef41de6cc7bc366276bf4e084fff2
ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add

The seg6_genl_sethmac() directly uses the algorithm ID provided by the
userspace without verifying whether it is an HMAC algorithm supported
by the system.
If an unsupported HMAC algorithm ID is configured, packets using SRv6 HMAC
will be dropped during encapsulation or decapsulation.

Fixes: 4f4853dc1c9c ("ipv6: sr: implement API to control SR HMAC structure")
Signed-off-by: Minhong He <heminhong@kylinos.cn>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250815063845.85426-1-heminhong@kylinos.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv6/seg6_hmac.c