K 10 svn:author V 2 ae K 8 svn:date V 27 2021-08-24T15:00:57.248858Z K 7 svn:log V 833 ipfw: fix possible data race between jump cache reading and updating. Jump cache is used to reduce the cost of rule lookup for O_SKIPTO and O_CALLRETURN actions. It uses rules chain id to check correctness of cached value. But due to the possible race, there is the chance that one thread can read invalid value. In some cases this can lead to out of bounds access and panic. Use thread fence operations to constrain the reordering of accesses. Also rename jump_fast and jump_linear functions to jump_cached and jump_lookup_pos respectively. Submitted by: Arseny Smalyuk Obtained from: Yandex LLC Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D31484 (cherry picked from commit 322e5efda8578bb9c0a0ab0ef785cd1e1c222c85) Git Hash: 8d0ced747a02c4f2337eccbe9ea2e1e38384f533 Git Author: ae@FreeBSD.org END