linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] sctp: Replace zero-length array with flexible array member
@ 2024-12-20 19:25 Thorsten Blum
  0 siblings, 0 replies; 6+ messages in thread
From: Thorsten Blum @ 2024-12-20 19:25 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, Xin Long
  Cc: linux-hardening, Thorsten Blum, Kees Cook, linux-sctp,
	linux-kernel

Replace the deprecated zero-length array with a modern flexible array
member in the struct sctp_idatahdr.

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/sctp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 836a7e200f39..19eaaf3948ed 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -239,7 +239,7 @@ struct sctp_idatahdr {
 		__u32 ppid;
 		__be32 fsn;
 	};
-	__u8 payload[0];
+	__u8 payload[];
 };
 
 struct sctp_idata_chunk {
-- 
2.47.1


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

* [RESEND PATCH] sctp: Replace zero-length array with flexible array member
@ 2025-01-14 21:54 Thorsten Blum
  0 siblings, 0 replies; 6+ messages in thread
From: Thorsten Blum @ 2025-01-14 21:54 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, Xin Long
  Cc: Thorsten Blum, Kees Cook, linux-sctp, linux-kernel

Replace the deprecated zero-length array with a modern flexible array
member in the struct sctp_idatahdr.

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/sctp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 836a7e200f39..19eaaf3948ed 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -239,7 +239,7 @@ struct sctp_idatahdr {
 		__u32 ppid;
 		__be32 fsn;
 	};
-	__u8 payload[0];
+	__u8 payload[];
 };
 
 struct sctp_idata_chunk {
-- 
2.47.1


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

* [RESEND PATCH] sctp: Replace zero-length array with flexible array member
@ 2025-02-19 11:26 Thorsten Blum
  2025-02-20  2:24 ` Kees Cook
  2025-02-21  1:33 ` Jakub Kicinski
  0 siblings, 2 replies; 6+ messages in thread
From: Thorsten Blum @ 2025-02-19 11:26 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Marcelo Ricardo Leitner, Xin Long
  Cc: Thorsten Blum, Kees Cook, linux-sctp, netdev, linux-kernel

Replace the deprecated zero-length array with a modern flexible array
member in the struct sctp_idatahdr.

Link: https://github.com/KSPP/linux/issues/78
Reviewed-by: Kees Cook <kees@kernel.org>
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 include/linux/sctp.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/sctp.h b/include/linux/sctp.h
index 836a7e200f39..19eaaf3948ed 100644
--- a/include/linux/sctp.h
+++ b/include/linux/sctp.h
@@ -239,7 +239,7 @@ struct sctp_idatahdr {
 		__u32 ppid;
 		__be32 fsn;
 	};
-	__u8 payload[0];
+	__u8 payload[];
 };
 
 struct sctp_idata_chunk {
-- 
2.48.1


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

* Re: [RESEND PATCH] sctp: Replace zero-length array with flexible array member
  2025-02-19 11:26 Thorsten Blum
@ 2025-02-20  2:24 ` Kees Cook
  2025-02-21  1:30   ` Jakub Kicinski
  2025-02-21  1:33 ` Jakub Kicinski
  1 sibling, 1 reply; 6+ messages in thread
From: Kees Cook @ 2025-02-20  2:24 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Marcelo Ricardo Leitner, Xin Long, linux-sctp,
	netdev, linux-kernel

On Wed, Feb 19, 2025 at 12:26:36PM +0100, Thorsten Blum wrote:
> Replace the deprecated zero-length array with a modern flexible array
> member in the struct sctp_idatahdr.
> 
> Link: https://github.com/KSPP/linux/issues/78
> Reviewed-by: Kees Cook <kees@kernel.org>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

I assume this will be picked up by netdev. I see 2 sctp patches pending
on patchwork:

https://patchwork.kernel.org/project/netdevbpf/list/?series=&submitter=&state=&q=sctp&archive=&delegate=

-Kees

> ---
>  include/linux/sctp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/sctp.h b/include/linux/sctp.h
> index 836a7e200f39..19eaaf3948ed 100644
> --- a/include/linux/sctp.h
> +++ b/include/linux/sctp.h
> @@ -239,7 +239,7 @@ struct sctp_idatahdr {
>  		__u32 ppid;
>  		__be32 fsn;
>  	};
> -	__u8 payload[0];
> +	__u8 payload[];
>  };
>  
>  struct sctp_idata_chunk {
> -- 
> 2.48.1
> 

-- 
Kees Cook

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

* Re: [RESEND PATCH] sctp: Replace zero-length array with flexible array member
  2025-02-20  2:24 ` Kees Cook
@ 2025-02-21  1:30   ` Jakub Kicinski
  0 siblings, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2025-02-21  1:30 UTC (permalink / raw)
  To: Kees Cook
  Cc: Thorsten Blum, David S. Miller, Eric Dumazet, Paolo Abeni,
	Simon Horman, Marcelo Ricardo Leitner, Xin Long, linux-sctp,
	netdev, linux-kernel

On Wed, 19 Feb 2025 18:24:36 -0800 Kees Cook wrote:
> On Wed, Feb 19, 2025 at 12:26:36PM +0100, Thorsten Blum wrote:
> > Replace the deprecated zero-length array with a modern flexible array
> > member in the struct sctp_idatahdr.
> > 
> > Link: https://github.com/KSPP/linux/issues/78
> > Reviewed-by: Kees Cook <kees@kernel.org>
> > Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>  
> 
> I assume this will be picked up by netdev. I see 2 sctp patches pending
> on patchwork:
> 
> https://patchwork.kernel.org/project/netdevbpf/list/?series=&submitter=&state=&q=sctp&archive=&delegate=

TIL patchwork supports q= 
Thanks! :)

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

* Re: [RESEND PATCH] sctp: Replace zero-length array with flexible array member
  2025-02-19 11:26 Thorsten Blum
  2025-02-20  2:24 ` Kees Cook
@ 2025-02-21  1:33 ` Jakub Kicinski
  1 sibling, 0 replies; 6+ messages in thread
From: Jakub Kicinski @ 2025-02-21  1:33 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman,
	Marcelo Ricardo Leitner, Xin Long, Kees Cook, linux-sctp, netdev,
	linux-kernel

On Wed, 19 Feb 2025 12:26:36 +0100 Thorsten Blum wrote:
> Replace the deprecated zero-length array with a modern flexible array
> member in the struct sctp_idatahdr.
> 
> Link: https://github.com/KSPP/linux/issues/78
> Reviewed-by: Kees Cook <kees@kernel.org>
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
> ---
>  include/linux/sctp.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/sctp.h b/include/linux/sctp.h
> index 836a7e200f39..19eaaf3948ed 100644
> --- a/include/linux/sctp.h
> +++ b/include/linux/sctp.h
> @@ -239,7 +239,7 @@ struct sctp_idatahdr {
>  		__u32 ppid;
>  		__be32 fsn;
>  	};
> -	__u8 payload[0];
> +	__u8 payload[];
>  };
>  
>  struct sctp_idata_chunk {

Builds for me with this field completely delete...
I think we should prefer deleting when possible.
-- 
pw-bot: cr

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

end of thread, other threads:[~2025-02-21  1:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 19:25 [RESEND PATCH] sctp: Replace zero-length array with flexible array member Thorsten Blum
  -- strict thread matches above, loose matches on Subject: below --
2025-01-14 21:54 Thorsten Blum
2025-02-19 11:26 Thorsten Blum
2025-02-20  2:24 ` Kees Cook
2025-02-21  1:30   ` Jakub Kicinski
2025-02-21  1:33 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).