linux-stable/net/x25
Joel Granados 78a7b5dbc0 ax.25: x.25: Remove the now superfluous sentinel elements from ctl_table array
This commit comes at the tail end of a greater effort to remove the
empty elements at the end of the ctl_table arrays (sentinels) which will
reduce the overall build time size of the kernel and run time memory
bloat by ~64 bytes per sentinel (further information Link :
https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)

Avoid a buffer overflow when traversing the ctl_table by ensuring that
AX25_MAX_VALUES is the same as the size of ax25_param_table. This is
done with a BUILD_BUG_ON where ax25_param_table is defined and a
CONFIG_AX25_DAMA_SLAVE guard in the unnamed enum definition as well as
in the ax25_dev_device_up and ax25_ds_set_timer functions.

The overflow happened when the sentinel was removed from
ax25_param_table. The sentinel's data element was changed when
CONFIG_AX25_DAMA_SLAVE was undefined. This had no adverse effects as it
still stopped on the sentinel's null procname but needed to be addressed
once the sentinel was removed.

Signed-off-by: Joel Granados <j.granados@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-05-03 13:29:43 +01:00
..
af_x25.c net/x25: fix incorrect parameter validation in the x25_getsockopt() function 2024-03-11 09:53:22 +00:00
Kconfig net: x25: remove dead links from Kconfig 2024-03-07 20:24:35 -08:00
Makefile
sysctl_net_x25.c ax.25: x.25: Remove the now superfluous sentinel elements from ctl_table array 2024-05-03 13:29:43 +01:00
x25_dev.c net/x25: Fix skb leak in x25_lapb_receive_frame() 2022-11-15 20:22:19 -08:00
x25_facilities.c net: remove SOCK_DEBUG leftovers 2023-12-26 20:31:01 +00:00
x25_forward.c net: x25: Use list_for_each_entry() to simplify code in x25_forward.c 2021-06-08 16:31:25 -07:00
x25_in.c net: x25: drop harmless check of !more 2021-12-09 18:35:11 -08:00
x25_link.c net: x25: Use list_for_each_entry() to simplify code in x25_link.c 2021-06-08 16:31:24 -07:00
x25_out.c net: remove SOCK_DEBUG leftovers 2023-12-26 20:31:01 +00:00
x25_proc.c x25: remove redundant pointer dev 2022-05-10 11:59:22 +02:00
x25_route.c net: x25: Use list_for_each_entry() to simplify code in x25_route.c 2021-06-10 14:08:09 -07:00
x25_subr.c net/x25: Fix null-ptr-deref in x25_disconnect 2020-04-28 14:08:59 -07:00
x25_timer.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 41 2019-05-24 17:27:12 +02:00