[PATCH] cfg80211: use size_t for mesh_setup::ie_len

Srinivas Achary posted 1 patch 1 week, 4 days ago
include/net/cfg80211.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] cfg80211: use size_t for mesh_setup::ie_len
Posted by Srinivas Achary 1 week, 4 days ago
mesh_setup::ie_len is currently declared as u8, limiting the maximum
IE length to 255 bytes. Callers may provide larger IE buffers, causing
the length to be truncated and resulting in incomplete or incorrect
processing of mesh information elements.

Use size_t for ie_len to correctly represent the buffer size and align
the field with the kernel's convention for memory lengths.

Signed-off-by: Srinivas Achary <srinivas@aerlync.com>
Co-authored-by: Ramakrishnan Rathinasamy <ramakrishnan@aerlync.com>
---
 include/net/cfg80211.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 8188ad200de5..ec715d10d98f 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2803,7 +2803,7 @@ struct mesh_setup {
 	u8 path_metric;
 	u8 auth_id;
 	const u8 *ie;
-	u8 ie_len;
+	size_t ie_len;
 	bool is_authenticated;
 	bool is_secure;
 	bool user_mpm;
-- 
2.34.1