Thread (13 messages) 13 messages, 3 authors, 2025-08-18

Re: [PATCH net-next v2 3/3] sctp: Convert cookie authentication to use HMAC-SHA256

From: Jakub Kicinski <kuba@kernel.org>
Date: 2025-08-18 15:43:46
Also in: linux-crypto, linux-sctp

On Sat, 16 Aug 2025 13:15:12 -0400 Xin Long wrote:
quoted
quoted
Ideally we'd just fail the write and remove the last mentions of md5 and
sha1 from the code.  But I'm concerned there could be a case where
userspace is enabling cookie authentication by setting
cookie_hmac_alg=md5 or cookie_hmac_alg=sha1, and by just failing the
write the system would end up with cookie authentication not enabled.

It would have been nice if this sysctl had just been a boolean toggle.

A deprecation warning might be a good idea.  How about the following on
top of this patch:  
No strong opinion but I find the deprecation warnings futile.
Chances are we'll be printing this until the end of time.
Either someone hard-cares and we'll need to revert, or nobody
does and we can deprecate today.  
Reviewing past network sysctl changes, several commits have simply
removed or renamed parameters:

4a7f60094411 ("tcp: remove thin_dupack feature")
4396e46187ca ("tcp: remove tcp_tw_recycle")
d8b81175e412 ("tcp: remove sk_{tr}x_skb_cache")
3e0b8f529c10 ("net/ipv6: Expand and rename accept_unsolicited_na to
accept_untracked_na")
5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes")

It seems to me that if we deprecate something, it's okay to change the
sysctls, so I would prefer rejecting writes with md5 or sha1, or even
better following Eric’s suggestion and turn this into a simple boolean
toggle.
Slight preference towards reject. bool is worse in case we need to
revert (if it takes a few releases for the regression report to appear
we may have to maintain backward compat with both string and bool
formats going forward).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help