public inbox for linux-security-module@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 net-next 06/15] smack: Remove IPPROTO_UDPLITE support in security_sock_rcv_skb().
       [not found] <20260304193034.1870586-1-kuniyu@google.com>
@ 2026-03-04 19:28 ` Kuniyuki Iwashima
  2026-03-05 17:08   ` Casey Schaufler
  0 siblings, 1 reply; 2+ messages in thread
From: Kuniyuki Iwashima @ 2026-03-04 19:28 UTC (permalink / raw)
  To: Willem de Bruijn, David Ahern, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, Kuniyuki Iwashima, netdev,
	Casey Schaufler, Paul Moore, James Morris, Serge E. Hallyn,
	linux-security-module

smack_socket_sock_rcv_skb() is registered as socket_sock_rcv_skb,
which is called as security_sock_rcv_skb() in sk_filter_trim_cap().

Now that UDP-Lite is gone, let's remove the IPPROTO_UDPLITE support
in smack_socket_sock_rcv_skb().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
---
Cc: Casey Schaufler <casey@schaufler-ca.com>
Cc: Paul Moore <paul@paul-moore.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org
---
 security/smack/smack_lsm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 98af9d7b9434..e581d6465946 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -4176,7 +4176,6 @@ static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip)
 			sip->sin6_port = th->source;
 		break;
 	case IPPROTO_UDP:
-	case IPPROTO_UDPLITE:
 		uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph);
 		if (uh != NULL)
 			sip->sin6_port = uh->source;
@@ -4301,8 +4300,7 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
 #if IS_ENABLED(CONFIG_IPV6)
 	case PF_INET6:
 		proto = smk_skb_to_addr_ipv6(skb, &sadd);
-		if (proto != IPPROTO_UDP && proto != IPPROTO_UDPLITE &&
-		    proto != IPPROTO_TCP)
+		if (proto != IPPROTO_UDP && proto != IPPROTO_TCP)
 			break;
 #ifdef SMACK_IPV6_SECMARK_LABELING
 		skp = smack_from_skb(skb);
-- 
2.53.0.473.g4a7958ca14-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 net-next 06/15] smack: Remove IPPROTO_UDPLITE support in security_sock_rcv_skb().
  2026-03-04 19:28 ` [PATCH v1 net-next 06/15] smack: Remove IPPROTO_UDPLITE support in security_sock_rcv_skb() Kuniyuki Iwashima
@ 2026-03-05 17:08   ` Casey Schaufler
  0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2026-03-05 17:08 UTC (permalink / raw)
  To: Kuniyuki Iwashima, Willem de Bruijn, David Ahern,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: Simon Horman, Kuniyuki Iwashima, netdev, Paul Moore, James Morris,
	Serge E. Hallyn, linux-security-module, Casey Schaufler

On 3/4/2026 11:28 AM, Kuniyuki Iwashima wrote:
> smack_socket_sock_rcv_skb() is registered as socket_sock_rcv_skb,
> which is called as security_sock_rcv_skb() in sk_filter_trim_cap().
>
> Now that UDP-Lite is gone, let's remove the IPPROTO_UDPLITE support
> in smack_socket_sock_rcv_skb().
>
> Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>

Acked-by: Casey Schaufler <casey@schaufler-ca.com>

> ---
> Cc: Casey Schaufler <casey@schaufler-ca.com>
> Cc: Paul Moore <paul@paul-moore.com>
> Cc: James Morris <jmorris@namei.org>
> Cc: "Serge E. Hallyn" <serge@hallyn.com>
> Cc: linux-security-module@vger.kernel.org
> ---
>  security/smack/smack_lsm.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
> index 98af9d7b9434..e581d6465946 100644
> --- a/security/smack/smack_lsm.c
> +++ b/security/smack/smack_lsm.c
> @@ -4176,7 +4176,6 @@ static int smk_skb_to_addr_ipv6(struct sk_buff *skb, struct sockaddr_in6 *sip)
>  			sip->sin6_port = th->source;
>  		break;
>  	case IPPROTO_UDP:
> -	case IPPROTO_UDPLITE:
>  		uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph);
>  		if (uh != NULL)
>  			sip->sin6_port = uh->source;
> @@ -4301,8 +4300,7 @@ static int smack_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb)
>  #if IS_ENABLED(CONFIG_IPV6)
>  	case PF_INET6:
>  		proto = smk_skb_to_addr_ipv6(skb, &sadd);
> -		if (proto != IPPROTO_UDP && proto != IPPROTO_UDPLITE &&
> -		    proto != IPPROTO_TCP)
> +		if (proto != IPPROTO_UDP && proto != IPPROTO_TCP)
>  			break;
>  #ifdef SMACK_IPV6_SECMARK_LABELING
>  		skp = smack_from_skb(skb);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-05 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260304193034.1870586-1-kuniyu@google.com>
2026-03-04 19:28 ` [PATCH v1 net-next 06/15] smack: Remove IPPROTO_UDPLITE support in security_sock_rcv_skb() Kuniyuki Iwashima
2026-03-05 17:08   ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox