NetworkManager/src/core/devices
Beniamino Galvani 3917235a2d wifi: fix list corruption when scanning with explicit SSID
Calling c_list_link_tail() on a list entry that already belongs to
another list corrupts the other list, in this case 'old_lst_head';
this is explained in the documentation of c_list_link_before():

 * @what is not inspected prior to being linked. Hence, it better not
 * be linked into another list, or the other list will be corrupted.

This can be reproduced by invoking "nmcli device wifi rescan ssid x"
multiple times; in this way, _scan_request_ssids_track() reuses the
previous SSID data, the list gets corrupted and this causes a crash.

Fixes: 7500e90b53 ('wifi: rework scanning of Wi-Fi device')

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/2076
(cherry picked from commit 3b75577871)
2024-11-26 16:20:00 +01:00
..
adsl core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
bluetooth core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
ovs ovs: fix assertion failure in netdev datapath mode 2024-09-16 12:40:03 +02:00
team core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
tests lldp: use new libnm-lldp instead of systemd's sd_lldp_rx 2022-10-25 10:59:01 +02:00
wifi wifi: fix list corruption when scanning with explicit SSID 2024-11-26 16:20:00 +01:00
wwan wwan: remove buggy assertion 2024-11-14 10:00:53 +01:00
meson.build all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-device-6lowpan.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-6lowpan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-bond.c core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-device-bond.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-bridge.c core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-device-bridge.h device: support reapplying bridge-port VLANs 2024-08-21 07:29:37 +02:00
nm-device-dummy.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-dummy.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ethernet-utils.c all: add "src/core/nm-default-daemon.h" as replacement for "nm-default.h" 2021-02-09 12:38:18 +01:00
nm-device-ethernet-utils.h all: move "src/" directory to "src/core/" 2021-02-08 09:56:41 +01:00
nm-device-ethernet.c core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-device-ethernet.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-factory.c Updated code format 2024-04-08 06:35:20 +00:00
nm-device-factory.h core: persist state of software generic devices across restarts 2024-02-21 11:49:20 +01:00
nm-device-generic.c device: support creating generic devices via device-handler 2024-02-21 11:49:19 +01:00
nm-device-generic.h device: support creating generic devices via device-handler 2024-02-21 11:49:19 +01:00
nm-device-hsr.c hsr: drop supervision-address from HSR setting 2023-12-19 13:54:21 +01:00
nm-device-hsr.h HSR: add support to HSR/PRP interface 2023-12-05 08:05:56 +01:00
nm-device-infiniband.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-infiniband.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ip-tunnel.c device: honor the @check_properties flag 2023-03-16 12:00:41 +01:00
nm-device-ip-tunnel.h devices: support VTI tunnels 2022-12-21 14:04:44 +01:00
nm-device-logging.h core: log the device type when it can be ambiguous 2023-06-12 11:17:09 +02:00
nm-device-loopback.c all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-loopback.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-macsec.c macsec: support the offload property 2024-02-21 11:48:43 +01:00
nm-device-macsec.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-macvlan.c device: honor the @check_properties flag 2023-03-16 12:00:41 +01:00
nm-device-macvlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-ppp.c device: add @check_properties argument to check_connection_compatible() 2023-03-16 12:00:40 +01:00
nm-device-ppp.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-private.h src: drop most slave references from the code 2024-08-09 15:47:32 +02:00
nm-device-tun.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-tun.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-utils.c core: rename NM_DEVICE_MANAGED_TYPE_MANAGED to _TYPE_FULL 2024-08-28 15:35:56 +02:00
nm-device-utils.h core: rename NM_DEVICE_MANAGED_TYPE_MANAGED to _TYPE_FULL 2024-08-28 15:35:56 +02:00
nm-device-veth.c veth: fix detection of existing interfaces in create_and_realize() 2022-12-19 10:47:13 +01:00
nm-device-veth.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vlan.c core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-device-vlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vrf.c src: drop most slave references from the code 2024-08-09 15:47:32 +02:00
nm-device-vrf.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-vxlan.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-vxlan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-wireguard.c core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-device-wireguard.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device-wpan.c core: mark deprecated D-Bus API as deprecated in Introspect() 2024-01-16 09:28:18 +01:00
nm-device-wpan.h all: use _NM_G_TYPE_CHECK_INSTANCE_CAST() for internal uses 2022-12-16 10:55:03 +01:00
nm-device.c sriov: only valid sriov capacity when enabled 2024-11-12 13:39:11 +01:00
nm-device.h core: rename sys-iface-state to managed-type internally 2024-08-28 15:35:56 +02:00
nm-lldp-listener.c lldp: fix crash dereferencing NULL pointer during debug logging 2024-08-19 12:51:34 +02:00
nm-lldp-listener.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00