freebsd-dev/sys/contrib
Alexander V. Chernikov 36e15b717e routing: Fix crashes with dpdk_lpm[46] algo.
When a prefix gets deleted from the RIB, dpdk_lpm algo needs to know
 the nexthop of the "parent" prefix to update its internal state.
The glue code, which utilises RIB as a backing route store, uses
 fib[46]_lookup_rt() for the prefix destination after its deletion
 to fetch the desired nexthop.
This approach does not work when deleting less-specific prefixes
 with most-specific ones are still present. For example, if
 10.0.0.0/24, 10.0.0.0/23 and 10.0.0.0/22 exist in RIB, deleting
 10.0.0.0/23 would result in 10.0.0.0/24 being returned as a search
 result instead of 10.0.0.0/22. This, in turn, results in the failed
 datastructure update: part of the deleted /23 prefix will still
 contain the reference to an old nexthop. This leads to the
 use-after-free behaviour, ending with the eventual crashes.

Fix the logic flaw by properly fetching the prefix "parent" via
 newly-created rt_get_inet[6]_parent() helpers.

Differential Revision: https://reviews.freebsd.org/D31546
PR:	256882,256833
MFC after:	1 week
2021-08-17 20:46:22 +00:00
..
alpine-hal
ck ck: Correct asm output operand widths in amd64 pointer intrinsics 2021-08-10 21:27:54 -04:00
cloudabi
dev acpica: Import ACPICA 20210730 2021-07-31 00:16:27 -04:00
device-tree dts: fsl-ls1028a: Correct ECAM PCIE window ranges 2021-07-01 20:23:40 +02:00
dpdk_rte_lpm routing: Fix crashes with dpdk_lpm[46] algo. 2021-08-17 20:46:22 +00:00
edk2 Document upgrade procedure in FREEBSD-upgrade 2020-06-04 20:48:57 +00:00
ena-com ena: Remove redundant declaration of ena_log_level. 2021-07-23 16:07:35 -07:00
ipfilter/netinet ipfilter: remove doubled semicolons 2021-08-16 13:16:42 -04:00
libb2
libfdt
libnv Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
libsodium Add chacha20poly1305 support to crypto build 2020-02-16 00:03:09 +00:00
ncsw [PowerPC] [Book-E] Remove obsolete interrupt binding workaround 2020-02-25 22:03:30 +00:00
ngatm ngatm: Handle errors from uni_msg_extend() 2021-06-06 16:44:47 -04:00
octeon-sdk mips/octeon SDK: Fix __cvmx_cmd_queue_lock asm for clang 11 2021-04-18 12:05:55 -05:00
openzfs zfs: merge openzfs/zfs@8ae86e2ed (master) into main 2021-08-17 21:10:44 +02:00
pcg-c/include pcg-c: Add 'static' to inline function definitions 2020-08-15 18:46:26 +00:00
rdma/krping ibcore: Declare ib_post_send() and ib_post_recv() arguments const 2021-07-12 14:22:33 +02:00
v4l
vchiq/interface vchiq: Rename timer func so they do not conflict with linuxkpi 2020-11-17 14:41:23 +00:00
x86emu
xz-embedded Modularize xz. 2019-02-26 19:55:03 +00:00
zlib MFV r351500: Fix CLEAR_HASH macro to be usable as a single statement. 2019-08-26 00:46:39 +00:00
zstd sys/*/conf/*, docs: fix links to handbook 2021-05-20 09:27:10 +01:00