]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop netlink-return-unsigned-value-for-nla_len.patch for now
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jan 2024 10:41:38 +0000 (11:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Jan 2024 10:41:38 +0000 (11:41 +0100)
queue-6.1/ipv6-remove-max_size-check-inline-with-ipv4.patch
queue-6.1/netlink-return-unsigned-value-for-nla_len.patch [deleted file]
queue-6.1/series
queue-6.6/netlink-return-unsigned-value-for-nla_len.patch [deleted file]
queue-6.6/series
queue-6.7/netlink-return-unsigned-value-for-nla_len.patch [deleted file]
queue-6.7/series

index f56f3b7fef0dc4e8faf35373010802a65804d1b4..4d71342dcefbb0cf7c37608a644a779bc16de09c 100644 (file)
@@ -109,6 +109,7 @@ Signed-off-by: Jon Maxwell <jmaxwell37@gmail.com>
 Reviewed-by: David Ahern <dsahern@kernel.org>
 Link: https://lore.kernel.org/r/20230112012532.311021-1-jmaxwell37@gmail.com
 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Cc: "Jitindar Singh, Suraj" <surajjs@amazon.com>
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 ---
  include/net/dst_ops.h |    2 +-
diff --git a/queue-6.1/netlink-return-unsigned-value-for-nla_len.patch b/queue-6.1/netlink-return-unsigned-value-for-nla_len.patch
deleted file mode 100644 (file)
index cdf8876..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 172db56d90d29e47e7d0d64885d5dbd92c87ec42 Mon Sep 17 00:00:00 2001
-From: Kees Cook <keescook@chromium.org>
-Date: Wed, 6 Dec 2023 12:59:07 -0800
-Subject: netlink: Return unsigned value for nla_len()
-
-From: Kees Cook <keescook@chromium.org>
-
-commit 172db56d90d29e47e7d0d64885d5dbd92c87ec42 upstream.
-
-The return value from nla_len() is never expected to be negative, and can
-never be more than struct nlattr::nla_len (a u16). Adjust the prototype
-on the function. This will let GCC's value range optimization passes
-know that the return can never be negative, and can never be larger than
-u16. As recently discussed[1], this silences the following warning in
-GCC 12+:
-
-net/wireless/nl80211.c: In function 'nl80211_set_cqm_rssi.isra':
-net/wireless/nl80211.c:12892:17: warning: 'memcpy' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
-12892 |                 memcpy(cqm_config->rssi_thresholds, thresholds,
-      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12893 |                        flex_array_size(cqm_config, rssi_thresholds,
-      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12894 |                                        n_thresholds));
-      |                                        ~~~~~~~~~~~~~~
-
-A future change would be to clamp the subtraction to make sure it never
-wraps around if nla_len is somehow less than NLA_HDRLEN, which would
-have the additional benefit of being defensive in the face of nlattr
-corruption or logic errors.
-
-Reported-by: kernel test robot <lkp@intel.com>
-Closes: https://lore.kernel.org/oe-kbuild-all/202311090752.hWcJWAHL-lkp@intel.com/ [1]
-Cc: Johannes Berg <johannes@sipsolutions.net>
-Cc: Jeff Johnson <quic_jjohnson@quicinc.com>
-Cc: Michael Walle <mwalle@kernel.org>
-Cc: Max Schulze <max.schulze@online.de>
-Link: https://lore.kernel.org/r/20231202202539.it.704-kees@kernel.org
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Link: https://lore.kernel.org/r/20231206205904.make.018-kees@kernel.org
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/net/netlink.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/include/net/netlink.h
-+++ b/include/net/netlink.h
-@@ -1181,7 +1181,7 @@ static inline void *nla_data(const struc
-  * nla_len - length of payload
-  * @nla: netlink attribute
-  */
--static inline int nla_len(const struct nlattr *nla)
-+static inline u16 nla_len(const struct nlattr *nla)
- {
-       return nla->nla_len - NLA_HDRLEN;
- }
index 905030412c90c6aee3c6a68a65c0faceb03f0817..00244dd8a676319e6352ee53a009893ed82473c2 100644 (file)
@@ -1,3 +1,2 @@
 nfsd-drop-the-nfsd_put-helper.patch
-netlink-return-unsigned-value-for-nla_len.patch
 ipv6-remove-max_size-check-inline-with-ipv4.patch
diff --git a/queue-6.6/netlink-return-unsigned-value-for-nla_len.patch b/queue-6.6/netlink-return-unsigned-value-for-nla_len.patch
deleted file mode 100644 (file)
index fbb7eda..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 172db56d90d29e47e7d0d64885d5dbd92c87ec42 Mon Sep 17 00:00:00 2001
-From: Kees Cook <keescook@chromium.org>
-Date: Wed, 6 Dec 2023 12:59:07 -0800
-Subject: netlink: Return unsigned value for nla_len()
-
-From: Kees Cook <keescook@chromium.org>
-
-commit 172db56d90d29e47e7d0d64885d5dbd92c87ec42 upstream.
-
-The return value from nla_len() is never expected to be negative, and can
-never be more than struct nlattr::nla_len (a u16). Adjust the prototype
-on the function. This will let GCC's value range optimization passes
-know that the return can never be negative, and can never be larger than
-u16. As recently discussed[1], this silences the following warning in
-GCC 12+:
-
-net/wireless/nl80211.c: In function 'nl80211_set_cqm_rssi.isra':
-net/wireless/nl80211.c:12892:17: warning: 'memcpy' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
-12892 |                 memcpy(cqm_config->rssi_thresholds, thresholds,
-      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12893 |                        flex_array_size(cqm_config, rssi_thresholds,
-      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12894 |                                        n_thresholds));
-      |                                        ~~~~~~~~~~~~~~
-
-A future change would be to clamp the subtraction to make sure it never
-wraps around if nla_len is somehow less than NLA_HDRLEN, which would
-have the additional benefit of being defensive in the face of nlattr
-corruption or logic errors.
-
-Reported-by: kernel test robot <lkp@intel.com>
-Closes: https://lore.kernel.org/oe-kbuild-all/202311090752.hWcJWAHL-lkp@intel.com/ [1]
-Cc: Johannes Berg <johannes@sipsolutions.net>
-Cc: Jeff Johnson <quic_jjohnson@quicinc.com>
-Cc: Michael Walle <mwalle@kernel.org>
-Cc: Max Schulze <max.schulze@online.de>
-Link: https://lore.kernel.org/r/20231202202539.it.704-kees@kernel.org
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Link: https://lore.kernel.org/r/20231206205904.make.018-kees@kernel.org
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/net/netlink.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/include/net/netlink.h
-+++ b/include/net/netlink.h
-@@ -1189,7 +1189,7 @@ static inline void *nla_data(const struc
-  * nla_len - length of payload
-  * @nla: netlink attribute
-  */
--static inline int nla_len(const struct nlattr *nla)
-+static inline u16 nla_len(const struct nlattr *nla)
- {
-       return nla->nla_len - NLA_HDRLEN;
- }
index 2e19a8a05383e932a04a1eae153fe729f32d2805..baacf34191dd73a84d0c4050775fedd669cdb3ec 100644 (file)
@@ -1,2 +1 @@
 nfsd-drop-the-nfsd_put-helper.patch
-netlink-return-unsigned-value-for-nla_len.patch
diff --git a/queue-6.7/netlink-return-unsigned-value-for-nla_len.patch b/queue-6.7/netlink-return-unsigned-value-for-nla_len.patch
deleted file mode 100644 (file)
index b93dbee..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-From 172db56d90d29e47e7d0d64885d5dbd92c87ec42 Mon Sep 17 00:00:00 2001
-From: Kees Cook <keescook@chromium.org>
-Date: Wed, 6 Dec 2023 12:59:07 -0800
-Subject: netlink: Return unsigned value for nla_len()
-
-From: Kees Cook <keescook@chromium.org>
-
-commit 172db56d90d29e47e7d0d64885d5dbd92c87ec42 upstream.
-
-The return value from nla_len() is never expected to be negative, and can
-never be more than struct nlattr::nla_len (a u16). Adjust the prototype
-on the function. This will let GCC's value range optimization passes
-know that the return can never be negative, and can never be larger than
-u16. As recently discussed[1], this silences the following warning in
-GCC 12+:
-
-net/wireless/nl80211.c: In function 'nl80211_set_cqm_rssi.isra':
-net/wireless/nl80211.c:12892:17: warning: 'memcpy' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
-12892 |                 memcpy(cqm_config->rssi_thresholds, thresholds,
-      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12893 |                        flex_array_size(cqm_config, rssi_thresholds,
-      |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-12894 |                                        n_thresholds));
-      |                                        ~~~~~~~~~~~~~~
-
-A future change would be to clamp the subtraction to make sure it never
-wraps around if nla_len is somehow less than NLA_HDRLEN, which would
-have the additional benefit of being defensive in the face of nlattr
-corruption or logic errors.
-
-Reported-by: kernel test robot <lkp@intel.com>
-Closes: https://lore.kernel.org/oe-kbuild-all/202311090752.hWcJWAHL-lkp@intel.com/ [1]
-Cc: Johannes Berg <johannes@sipsolutions.net>
-Cc: Jeff Johnson <quic_jjohnson@quicinc.com>
-Cc: Michael Walle <mwalle@kernel.org>
-Cc: Max Schulze <max.schulze@online.de>
-Link: https://lore.kernel.org/r/20231202202539.it.704-kees@kernel.org
-Signed-off-by: Kees Cook <keescook@chromium.org>
-Link: https://lore.kernel.org/r/20231206205904.make.018-kees@kernel.org
-Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
----
- include/net/netlink.h |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/include/net/netlink.h
-+++ b/include/net/netlink.h
-@@ -1200,7 +1200,7 @@ static inline void *nla_data(const struc
-  * nla_len - length of payload
-  * @nla: netlink attribute
-  */
--static inline int nla_len(const struct nlattr *nla)
-+static inline u16 nla_len(const struct nlattr *nla)
- {
-       return nla->nla_len - NLA_HDRLEN;
- }
index d58f7843c31d49a78f82b51fd5453995b3bf59c1..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1 +0,0 @@
-netlink-return-unsigned-value-for-nla_len.patch