From patchwork Fri Dec 20 19:25:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thorsten Blum X-Patchwork-Id: 13917330 Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86DFE143736 for ; Fri, 20 Dec 2024 19:26:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.186 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734722773; cv=none; b=f0TaCeKCRZbE7w3CYuiLhxiIL1l5IBR0RAkkUFY+hwzR5U5q+1kGfx4rcBnKPs5hUO+HJ4H6mYIdFeDadQ5s8s3FB7e8BoGPg8zjEQWphw5S9ooS/uL4/8+fbLl1wcvxdfC/pWclJIEu5zH90lYY2aLhhru6tVjzpXo8svBTn2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734722773; c=relaxed/simple; bh=GctQo7H8HkmP6GW9U3X0MKlIXcENPnDLXaQ5lhGQv4U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Qffj57+U43Xt2Qz3FghY3c1nXRqo2lDVdMTGIR+2Hw82/rnVJNOrOQJJ/EhOQv/f0lf7bPvYj8kMiWQyghmxuGZiHVGH9fIFYHm23/uXYWb4Az5/DdgkJRiSskXNcHIJ7NqhltEe8YpjlIz3IujUdCkBM5EI5PjPQN8wMca0LEw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=eCsfJAtu; arc=none smtp.client-ip=91.218.175.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="eCsfJAtu" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1734722768; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=kmvn+FRsH75b3AFcBnzEsuAkCfsGQozChkxL0TaYJnk=; b=eCsfJAtugHhfRYvNa24Gzb5XvdrOEgpAkM2rEjmE7CCsMwLZv24ELdhrweTr4NOSJ80hc1 3R406NQMjddazE06afo03ojDHCrINTzU2BlL9ETbDg5aSrl54F3VFTZyfLN7ci8fpC90IB 9AVF9neMQ9XBohWMLnTZkyBqgmRcNi4= From: Thorsten Blum To: Marcelo Ricardo Leitner , Xin Long Cc: linux-hardening@vger.kernel.org, Thorsten Blum , Kees Cook , linux-sctp@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RESEND PATCH] sctp: Replace zero-length array with flexible array member Date: Fri, 20 Dec 2024 20:25:43 +0100 Message-ID: <20241220192543.2048-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-hardening@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT 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 Signed-off-by: Thorsten Blum --- 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 {