Files
linux/include/net
Kuniyuki Iwashima c0c8d419da af_unix: Add dead flag to struct scm_fp_list.
commit 7172dc93d621d5dc302d007e95ddd1311ec64283 upstream.

Commit 1af2dface5d2 ("af_unix: Don't access successor in unix_del_edges()
during GC.") fixed use-after-free by avoid accessing edge->successor while
GC is in progress.

However, there could be a small race window where another process could
call unix_del_edges() while gc_in_progress is true and __skb_queue_purge()
is on the way.

So, we need another marker for struct scm_fp_list which indicates if the
skb is garbage-collected.

This patch adds dead flag in struct scm_fp_list and set it true before
calling __skb_queue_purge().

Fixes: 1af2dface5d2 ("af_unix: Don't access successor in unix_del_edges() during GC.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/r/20240508171150.50601-1-kuniyu@amazon.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Lee Jones <lee@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-06-04 14:42:24 +02:00
..
2025-02-08 09:51:55 +01:00
2022-08-09 22:14:02 -07:00
2021-12-16 07:18:35 -08:00
2023-11-20 11:59:34 +01:00
2021-10-15 11:33:08 +01:00
2024-01-31 16:19:01 -08:00
2023-04-22 01:39:41 +02:00
2025-03-07 16:45:39 +01:00
2024-12-19 18:11:28 +01:00
2021-10-13 09:40:46 -07:00
2023-08-22 17:31:18 -07:00
2025-02-21 13:57:20 +01:00
2023-05-11 18:07:05 -07:00
2023-07-14 20:39:30 -07:00
2019-04-22 21:47:25 -07:00
2019-10-05 16:29:00 -07:00
2025-02-27 04:10:50 -08:00
2023-02-16 09:27:07 +01:00
2025-02-27 04:10:50 -08:00
2024-07-18 13:21:12 +02:00
2023-07-28 14:07:59 -07:00
2022-12-12 15:04:39 -08:00
2023-11-20 11:58:56 +01:00
2023-08-02 10:58:26 +01:00
2023-07-19 09:56:49 -07:00