opnsense-src/sys/netinet
Arseny Smalyuk ed80803df4 netinet6: Fix mbuf leak in NDP
Mbufs leak when manually removing incomplete NDP records with pending packet via ndp -d.
It happens because lltable_drop_entry_queue() rely on `la_numheld`
counter when dropping NDP entries (lles). It turned out NDP code never
increased `la_numheld`, so the actual free never happened.

Fix the issue by introducing unified lltable_append_entry_queue(),
common for both ARP and NDP code, properly addressing packet queue
maintenance.

Reviewed By: melifaro
Differential Revision: https://reviews.freebsd.org/D35365
MFC after:	2 weeks

(cherry picked from commit d18b4bec98)
2023-05-09 11:05:03 +02:00
..
cc cc_vegas(4): Fix a typo in a source code comment 2022-04-09 08:16:35 +02:00
khelp khelp(9): Fix a typo in a source code comment 2022-04-09 08:13:16 +02:00
libalias libalias: improve handling of invalid SCTP packets 2023-02-02 01:01:43 +01:00
netdump netdump(4): Correct a typo in source code comment 2022-09-07 09:28:34 +02:00
tcp_stacks tcp: remove unused t_rttbest 2023-02-02 01:02:30 +01:00
accf_data.c Define a module version for accept filter modules. 2020-05-19 18:35:08 +00:00
accf_dns.c Define a module version for accept filter modules. 2020-05-19 18:35:08 +00:00
accf_http.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
dccp.h Add header definition for RFC4340, Datagram Congestion Control Protocol 2020-06-17 13:27:13 +00:00
icmp6.h netinet6: Fix mbuf leak in NDP 2023-05-09 11:05:03 +02:00
icmp_var.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
if_ether.c netinet6: Fix mbuf leak in NDP 2023-05-09 11:05:03 +02:00
if_ether.h Retire arpresolve_addr(), which is not used anywhere, from if_ether.c. 2018-11-17 16:08:36 +00:00
igmp.c inet: Simplify if_multiaddrs iteration. 2022-10-23 13:40:47 -04:00
igmp.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
igmp_var.h igmp: convert igmpstat to use PCPU counters 2020-11-08 18:49:23 +00:00
in.c netinet: pass cred instead of the curthread to ifaddr manipulation funcs. 2023-01-13 21:24:12 +00:00
in.h kernel: deprecate Internet Class A/B/C 2021-12-10 10:24:15 -06:00
in_cksum.c netinet: Implement in_cksum_skip() using m_apply() 2021-12-01 07:43:03 -05:00
in_debug.c CK: update consumers to use CK macros across the board 2018-05-24 23:21:23 +00:00
in_fib.c routing: refactor private KPI 2023-01-13 21:18:26 +00:00
in_fib.h Refactor fib4/fib6 functions. 2020-11-29 13:41:49 +00:00
in_fib_algo.c Fix IPv4 fib bsearch4() lookup array construction. 2021-01-17 20:32:26 +00:00
in_fib_dxr.c fib_algo: shift / mask by constants in dxr_lookup() 2022-02-06 08:33:17 +01:00
in_gif.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in_jail.c sysent: Get rid of bogus sys/sysent.h include. 2022-06-17 22:35:31 +03:00
in_kdtrace.c Fix dtrace SDT probe tcp:::debug-input 2022-02-23 08:47:40 -09:00
in_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
in_mcast.c inet: Simplify if_multiaddrs iteration. 2022-10-23 13:40:47 -04:00
in_pcb.c netinet: Fix a typo in a source code comment 2022-04-09 08:10:08 +02:00
in_pcb.h netinet: Correct a typo in source code comment 2022-09-07 09:28:21 +02:00
in_pcbgroup.c inet(3): Fix a few common typos in source code comments 2021-08-31 08:11:48 +02:00
in_prot.c Move most of the contents of opt_compat.h to opt_global.h. 2018-04-06 17:35:35 +00:00
in_proto.c Remove unused nhop_ref_any() function. 2020-09-20 21:32:52 +00:00
in_rmx.c routing: add nhop(9) kpi. 2023-01-13 21:18:26 +00:00
in_rss.c in_rss: fix set but not used warning 2022-05-14 11:10:19 +02:00
in_rss.h Implement flowid calculation for outbound connections to balance 2020-10-18 17:15:47 +00:00
in_systm.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
in_var.h inet: Simplify if_multiaddrs iteration. 2022-10-23 13:40:47 -04:00
ip.h carp: Set DSCP value CS7 2018-07-01 08:37:07 +00:00
ip6.h net: Introduce IPV6_DSCP(), IPV6_ECN() and IPV6_TRAFFIC_CLASS() macros 2021-05-10 16:30:44 +02:00
ip_carp.c carp: carp_master_down_locked() requires net epoch 2023-03-22 23:46:43 +08:00
ip_carp.h carp: replace caddr_t with char * 2019-12-06 16:35:48 +00:00
ip_divert.c netinet: Remove unneeded mb_unmapped_to_ext() calls 2021-12-01 07:43:18 -05:00
ip_divert.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
ip_dummynet.h ipfw: use unsigned int for dummynet bandwidth 2021-08-26 14:05:26 +02:00
ip_ecn.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_ecn.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_encap.c Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
ip_encap.h Add KPI that can be used by tunneling interfaces to handle IP addresses 2018-10-21 17:55:26 +00:00
ip_fastfwd.c IPv4: fix redirect sending conditions 2021-12-29 10:52:52 +00:00
ip_fw.h ipfw: add support radix tables and table lookup for MAC addresses 2022-07-14 16:04:22 +03:00
ip_gre.c ip_gre: Fix a common typo in source code comments 2023-01-22 10:08:15 +01:00
ip_icmp.c Address issue pointed out in CVE-2020-25705 2022-04-07 09:35:36 +02:00
ip_icmp.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_id.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
ip_input.c Unbreak builds having SCTP support compiled in 2023-02-02 01:01:06 +01:00
ip_mroute.c socket: Implement SO_RERROR 2021-08-10 18:54:00 -07:00
ip_mroute.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_options.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
ip_options.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
ip_output.c Fix ipfw fwd that doesn't work in some cases 2022-04-18 11:58:45 +03:00
ip_reass.c ip_reass: do less work in ipreass_slowtimo if possible 2021-08-18 09:44:44 +00:00
ip_var.h An earlier commit effectively turned out the fast forwading path 2020-11-12 21:58:47 +00:00
pim.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
pim_var.h Rework IP encapsulation handling code. 2018-06-05 20:51:01 +00:00
raw_ip.c socket: Implement SO_RERROR 2021-08-10 18:54:00 -07:00
sctp.h Improve the handling of cookie life times. 2020-10-16 10:44:48 +00:00
sctp_asconf.c sctp: improve consistency 2023-02-01 23:46:49 +01:00
sctp_asconf.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_auth.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_auth.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_bsd_addr.c sctp: fix typos 2023-02-01 23:27:44 +01:00
sctp_bsd_addr.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_cc_functions.c sctp: fix typos 2023-02-01 23:27:44 +01:00
sctp_constants.h sctp: improve handling of sctp inpcb flags 2023-02-02 00:17:29 +01:00
sctp_crc32.c sctp: fix a signed/unsigned mismatch. 2022-02-23 01:14:07 +01:00
sctp_crc32.h sctp: fix a signed/unsigned mismatch. 2022-02-23 01:14:07 +01:00
sctp_header.h Whitespace changes. 2020-09-24 12:26:06 +00:00
sctp_indata.c sctp: tweak panic message 2023-02-02 00:31:46 +01:00
sctp_indata.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_input.c sctp: improve sending of ABORT packets in response to INIT-ACKs 2023-02-02 00:59:34 +01:00
sctp_input.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_kdtrace.c Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_kdtrace.h Separate out SCTP related dtrace code. 2019-10-14 20:32:11 +00:00
sctp_lock_bsd.h sctp: get rid of stcb send lock 2023-02-01 23:22:59 +01:00
sctp_module.c Provide support for building SCTP as a loadable module. 2020-07-10 14:56:05 +00:00
sctp_os.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_os_bsd.h sctp: use sb_avail() when accessing sb_acc for reading 2023-02-01 23:56:33 +01:00
sctp_output.c sctp: improve handling of send() calls with no user data` 2023-02-02 00:32:26 +01:00
sctp_output.h sctp: cleanup the SCTP_MAXSEG socket option. 2022-02-23 00:55:23 +01:00
sctp_pcb.c sctp: improve handling of sctp inpcb flags 2023-02-02 00:17:29 +01:00
sctp_pcb.h sctp: improve handling of sctp inpcb flags 2023-02-02 00:17:29 +01:00
sctp_peeloff.c sctp: Remove an unused sctp_inpcb field 2021-09-14 08:51:45 -04:00
sctp_peeloff.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
sctp_ss_functions.c sctp: fix typos 2023-02-01 23:27:44 +01:00
sctp_structs.h sctp: cleanup, no functional change 2023-02-02 00:18:24 +01:00
sctp_syscalls.c Convert remaining cap_rights_init users to cap_rights_init_one 2021-01-12 13:16:10 +00:00
sctp_sysctl.c sctp: cleanup 2023-02-01 23:39:45 +01:00
sctp_sysctl.h sctp: fix typos 2023-02-01 23:27:44 +01:00
sctp_timer.c sctp: improve path verification 2023-02-01 23:48:07 +01:00
sctp_timer.h net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
sctp_uio.h sctp: get rid of stcb send lock 2023-02-01 23:22:59 +01:00
sctp_usrreq.c sctp: do not clobber listening socket with sockbuf operations 2023-02-02 00:27:30 +01:00
sctp_var.h sctp: more sb_cc related cleanups 2023-02-01 23:57:27 +01:00
sctputil.c sctp: improve delivery of stream reset notifications 2023-02-06 23:20:32 +01:00
sctputil.h sctp: more sb_cc related cleanups 2023-02-01 23:57:27 +01:00
siftr.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp.h ipfw: Have NAT steal the TH_RES1 bit, instead of the TH_AE bit 2022-11-09 23:17:35 +01:00
tcp_accounting.h This brings into sync FreeBSD with the netflix versions of rack and bbr. 2021-06-09 01:56:18 +02:00
tcp_debug.c sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
tcp_debug.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
tcp_fastopen.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
tcp_fastopen.h Greatly reduce the number of #ifdefs supporting the TCP_RFC7413 kernel option. 2018-02-26 03:03:41 +00:00
tcp_fsm.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
tcp_hostcache.c tcp(4): Fix a typo in a sysctl description 2021-12-03 16:53:14 +01:00
tcp_hostcache.h tcp: Use jenkins_hash32() in hostcache 2021-04-16 22:44:03 +02:00
tcp_hpts.c tcp_hpts: Fix a typo in a source code comment 2023-01-14 10:27:03 +01:00
tcp_hpts.h tcp_hpts: Correct some typos in source code comments 2022-09-07 09:22:29 +02:00
tcp_input.c tcp: remove unused t_rttbest 2023-02-02 01:02:30 +01:00
tcp_log_buf.c BBLog: improve sysctl variables 2023-02-02 01:04:30 +01:00
tcp_log_buf.h This brings into sync FreeBSD with the netflix versions of rack and bbr. 2021-06-09 01:56:18 +02:00
tcp_lro.c Fix typo (interrups -> interrupts) in a sysctl description in tcp_lro.c. 2022-04-06 18:49:50 -07:00
tcp_lro.h tcp: Avoid conditionally defined fields in union lro_address 2022-02-21 09:57:04 -05:00
tcp_offload.c Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
tcp_offload.h Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
tcp_output.c tcp: improve BBLog for output events when using the FreeBSD stack 2023-02-02 00:33:06 +01:00
tcp_pcap.c tcp: fix TCPPCAP for kernels enabling VNET 2023-02-02 00:22:47 +01:00
tcp_pcap.h The TCPPCAP debugging feature caches recently-used mbufs for use in 2016-07-06 16:17:13 +00:00
tcp_ratelimit.c This brings into sync FreeBSD with the netflix versions of rack and bbr. 2021-06-09 01:56:18 +02:00
tcp_ratelimit.h This takes Warners suggested approach to making it so that 2021-06-09 01:59:21 +02:00
tcp_reass.c [tcp] Keep socket buffer locked until upcall 2021-06-09 12:51:19 +02:00
tcp_sack.c This brings into sync FreeBSD with the netflix versions of rack and bbr. 2021-06-09 01:56:18 +02:00
tcp_seq.h tcp: Correctly compute the retransmit length for all 64-bit platforms. 2022-06-06 21:58:05 +02:00
tcp_stats.c Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many) 2020-02-26 14:26:36 +00:00
tcp_subr.c tcp: improve error handling of net.inet.tcp.udp_tunneling_port 2023-02-06 23:17:09 +01:00
tcp_syncache.c tcp: fix stats counter for SYN_RCVD state when TCP-FO is used 2023-02-02 00:33:56 +01:00
tcp_syncache.h mend 2021-06-07 11:01:28 +02:00
tcp_timer.c tcp: virtualise net.inet.tcp.msl sysctl. 2022-03-28 08:46:13 +00:00
tcp_timer.h tcp: virtualise net.inet.tcp.msl sysctl. 2022-03-28 08:46:13 +00:00
tcp_timewait.c tcp: improve handling of SYN-ACK segments in TIMEWAIT state 2023-02-02 00:47:53 +01:00
tcp_usrreq.c tcp: remove unused t_rttbest 2023-02-02 01:02:30 +01:00
tcp_var.h tcp: remove unused t_rttbest 2023-02-02 01:02:30 +01:00
tcpip.h sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
toecore.c routing: Allow using IPv6 next-hops for IPv4 routes (RFC 5549). 2021-09-07 21:25:06 +00:00
toecore.h Initial support for kernel offload of TLS receive. 2020-04-27 23:17:19 +00:00
udp.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00
udp_usrreq.c netinet: allow UDP tunnels to be removed 2022-02-28 16:38:05 +01:00
udp_var.h Add a knob to allow zero UDP checksums for UDP/IPv6 traffic on the given UDP port. 2020-09-18 02:21:15 +00:00
udplite.h White space cleanup -- remove trailing tab's or spaces 2020-02-12 13:31:36 +00:00