[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iKK5eJDmijNvxPESDOTEYBPcZfFWiDqvb9Bd+rGk=3bQw@mail.gmail.com>
Date: Wed, 17 Sep 2025 21:22:44 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Daniel Zahka <daniel.zahka@...il.com>
Cc: Donald Hunter <donald.hunter@...il.com>, Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Jonathan Corbet <corbet@....net>, Andrew Lunn <andrew+netdev@...n.ch>,
Saeed Mahameed <saeedm@...dia.com>, Leon Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
Boris Pismenny <borisp@...dia.com>, Kuniyuki Iwashima <kuniyu@...gle.com>,
Willem de Bruijn <willemb@...gle.com>, David Ahern <dsahern@...nel.org>,
Neal Cardwell <ncardwell@...gle.com>, Patrisious Haddad <phaddad@...dia.com>, Raed Salem <raeds@...dia.com>,
Jianbo Liu <jianbol@...dia.com>, Dragos Tatulea <dtatulea@...dia.com>,
Rahul Rameshbabu <rrameshbabu@...dia.com>, Stanislav Fomichev <sdf@...ichev.me>,
Toke Høiland-Jørgensen <toke@...hat.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>, Kiran Kella <kiran.kella@...adcom.com>,
Jacob Keller <jacob.e.keller@...el.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v13 10/19] psp: track generations of device key
On Tue, Sep 16, 2025 at 5:10 PM Daniel Zahka <daniel.zahka@...il.com> wrote:
>
> From: Jakub Kicinski <kuba@...nel.org>
>
> There is a (somewhat theoretical in absence of multi-host support)
> possibility that another entity will rotate the key and we won't
> know. This may lead to accepting packets with matching SPI but
> which used different crypto keys than we expected.
>
> The PSP Architecture specification mentions that an implementation
> should track device key generation when device keys are managed by the
> NIC. Some PSP implementations may opt to include this key generation
> state in decryption metadata each time a device key is used to decrypt
> a packet. If that is the case, that key generation counter can also be
> used when policy checking a decrypted skb against a psp_assoc. This is
> an optional feature that is not explicitly part of the PSP spec, but
> can provide additional security in the case where an attacker may have
> the ability to force key rotations faster than rekeying can occur.
>
> Since we're tracking "key generations" more explicitly now,
> maintain different lists for associations from different generations.
> This way we can catch stale associations (the user space should
> listen to rotation notifications and change the keys).
>
> Drivers can "opt out" of generation tracking by setting
> the generation value to 0.
>
> Reviewed-by: Willem de Bruijn <willemb@...gle.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Daniel Zahka <daniel.zahka@...il.com>
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists