]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 days agoRemove un-used mysql option developer/ndptech master
Nick Porter [Fri, 31 Jul 2026 16:29:17 +0000 (17:29 +0100)] 
Remove un-used mysql option

This option only applies to synchronous connections and defaults to
false anyway, which is the value which was being set.

2 days agoAdd support for Mariadb Connector/C socket notification callbacks
Nick Porter [Fri, 31 Jul 2026 15:56:30 +0000 (16:56 +0100)] 
Add support for Mariadb Connector/C socket notification callbacks

In anticipation of them being added to the library.

2 days agoHandle MariaDB Connector/C socket closing behaviour
Nick Porter [Fri, 31 Jul 2026 15:55:03 +0000 (16:55 +0100)] 
Handle MariaDB Connector/C socket closing behaviour

During connection establishement, MariaDB Connector/C can close the fd
and potentially open a new one without any callbacks to notify of that
happening.

If we have events registered for the fd that has now been closed,
potentially events fire for that fd when it has been re-used for a
different purpose.

Using dup() to create our own fd for the socket, we remain in control of
the fd which has registered events.

2 days agoReplace deprecated mysql_options with mysql_optionsv
Nick Porter [Fri, 31 Jul 2026 13:59:56 +0000 (14:59 +0100)] 
Replace deprecated mysql_options with mysql_optionsv

2 days agoFreeRADIUS is only built against mariadb-connector, not libmysql
Nick Porter [Fri, 31 Jul 2026 13:50:43 +0000 (14:50 +0100)] 
FreeRADIUS is only built against mariadb-connector, not libmysql

Due to the difference in async behaviour.

3 days agoprint out the correct location of the log
Alan T. DeKok [Thu, 30 Jul 2026 15:50:09 +0000 (11:50 -0400)] 
print out the correct location of the log

3 days agoadd Password.PSK, and glue into password function
Alan T. DeKok [Thu, 30 Jul 2026 15:21:08 +0000 (11:21 -0400)] 
add Password.PSK, and glue into password function

3 days agolib/util/cbor: emit tag before array header when encoding IPv6 addr with scope_id
Alexander Bainbridge-Sedivy [Mon, 27 Jul 2026 19:45:47 +0000 (15:45 -0400)] 
lib/util/cbor: emit tag before array header when encoding IPv6 addr with scope_id

3 days agolib/util/cap: fr_cap_disable clears the whole set instead of the single requested...
Alexander Bainbridge-Sedivy [Mon, 27 Jul 2026 19:20:27 +0000 (15:20 -0400)] 
lib/util/cap: fr_cap_disable clears the whole set instead of the single requested capability

3 days agolib/util/calc.h: fix wrong nonnull() arg on fr_value_calc_unary_op (protects ctx...
Alexander Bainbridge-Sedivy [Mon, 27 Jul 2026 18:30:16 +0000 (14:30 -0400)] 
lib/util/calc.h: fix wrong nonnull() arg on fr_value_calc_unary_op (protects ctx, not dst/src)

3 days agolib/util/base32: fix copy-pasted 'Base 64 encode' doc header on fr_base32_encode_nstd
Alexander Bainbridge-Sedivy [Mon, 27 Jul 2026 14:45:59 +0000 (10:45 -0400)] 
lib/util/base32: fix copy-pasted 'Base 64 encode' doc header on fr_base32_encode_nstd

3 days agolib/util/base.h: remove duplicate util/table.h include
Alexander Bainbridge-Sedivy [Mon, 27 Jul 2026 14:03:55 +0000 (10:03 -0400)] 
lib/util/base.h: remove duplicate util/table.h include

3 days agolib/util/atexit.h: fix __Thread_local typo so non-threaded build strips _Thread_local...
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 20:25:13 +0000 (16:25 -0400)] 
lib/util/atexit.h: fix __Thread_local typo so non-threaded build strips _Thread_local qualifier

3 days agoatexit.c: guard NULL fr_atexit_global in fr_atexit_global_disarm
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 20:10:28 +0000 (16:10 -0400)] 
atexit.c: guard NULL fr_atexit_global in fr_atexit_global_disarm

3 days agolib/unlang/xlat_redundant: free leaked mrx_tree on two error paths in xlat_register_r...
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 19:54:58 +0000 (15:54 -0400)] 
lib/unlang/xlat_redundant: free leaked mrx_tree on two error paths in xlat_register_redundant

3 days agolib/unlang/xlat_purify: avoid use-after-free of freed group node when hoisting an...
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 19:09:39 +0000 (15:09 -0400)] 
lib/unlang/xlat_purify: avoid use-after-free of freed group node when hoisting an empty group

3 days agolib/unlang/xlat_func: fix typo in xlat_mctx_set doc comment (about -> bound)
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 17:47:42 +0000 (13:47 -0400)] 
lib/unlang/xlat_func: fix typo in xlat_mctx_set doc comment (about -> bound)

3 days agolib/unlang/xlat_expr: parent xlat_logical_and result box from rctx->ctx (latent UAF)
Alexander Bainbridge-Sedivy [Fri, 24 Jul 2026 16:01:34 +0000 (12:01 -0400)] 
lib/unlang/xlat_expr: parent xlat_logical_and result box from rctx->ctx (latent UAF)

3 days agolib/unlang/xlat_alloc: check tmpl_copy() failure in _xlat_copy_internal (NULL deref)
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 19:41:06 +0000 (15:41 -0400)] 
lib/unlang/xlat_alloc: check tmpl_copy() failure in _xlat_copy_internal (NULL deref)

3 days agolib/unlang/xlat: drop stale UNUSED on unlang_xlat() p_result parameter (it is used)
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 18:53:46 +0000 (14:53 -0400)] 
lib/unlang/xlat: drop stale UNUSED on unlang_xlat() p_result parameter (it is used)

3 days agounlang/try: default 'catch' redundancy check never fires (loop starts at RLM_MODULE_N...
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 18:36:06 +0000 (14:36 -0400)] 
unlang/try: default 'catch' redundancy check never fires (loop starts at RLM_MODULE_NOT_SET)

3 days agolib/unlang/subrequest: remove dead unlang_subrequest_detach_child declaration
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 15:46:20 +0000 (11:46 -0400)] 
lib/unlang/subrequest: remove dead unlang_subrequest_detach_child declaration

3 days agolib/unlang/subrequest: fix OOB read from signed-char index into fr_dict_attr_allowed_...
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 15:38:22 +0000 (11:38 -0400)] 
lib/unlang/subrequest: fix OOB read from signed-char index into fr_dict_attr_allowed_chars

3 days agolib/unlang/map: free leaked unlang_group_t on two error paths in unlang_compile_map()
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 15:03:50 +0000 (11:03 -0400)] 
lib/unlang/map: free leaked unlang_group_t on two error paths in unlang_compile_map()

3 days agounlang/limit: fix NULL deref in signal handler when cancelling a dynamic limit argument
Alexander Bainbridge-Sedivy [Wed, 22 Jul 2026 14:34:20 +0000 (10:34 -0400)] 
unlang/limit: fix NULL deref in signal handler when cancelling a dynamic limit argument

3 days agolib/unlang/io: fix misleading doc claiming NULL namespace is supported in unlang_io_s...
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 20:50:07 +0000 (16:50 -0400)] 
lib/unlang/io: fix misleading doc claiming NULL namespace is supported in unlang_io_subrequest_alloc

3 days agounlang/interpret_synchronous: remove dead num_events == -1 branches in DEBUG4
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 20:33:11 +0000 (16:33 -0400)] 
unlang/interpret_synchronous: remove dead num_events == -1 branches in DEBUG4

3 days agounlang/interpret.h: fix copy-pasted doc comment on unlang_request_scheduled_t typedef
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 20:04:31 +0000 (16:04 -0400)] 
unlang/interpret.h: fix copy-pasted doc comment on unlang_request_scheduled_t typedef

3 days agounlang/interpret: fix stale comment on unlang_cancel_xlat immediate-cancel path
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 19:55:33 +0000 (15:55 -0400)] 
unlang/interpret: fix stale comment on unlang_cancel_xlat immediate-cancel path

3 days agounlang/function: FUNC()/REPEAT() macros ignore their argument and use captured 'state'
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 19:47:04 +0000 (15:47 -0400)] 
unlang/function: FUNC()/REPEAT() macros ignore their argument and use captured 'state'

3 days agounlang/finally: fix inverted min_time comparison that cancels finally sections early
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 19:00:26 +0000 (15:00 -0400)] 
unlang/finally: fix inverted min_time comparison that cancels finally sections early

3 days agolib/unlang/edit: clear RHS tmpl dcursor on temporary_pair_list error paths (leak)
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 18:43:00 +0000 (14:43 -0400)] 
lib/unlang/edit: clear RHS tmpl dcursor on temporary_pair_list error paths (leak)

3 days agolib/unlang/compile: bound module-name split offset to avoid stack OOB write in compil...
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 18:25:53 +0000 (14:25 -0400)] 
lib/unlang/compile: bound module-name split offset to avoid stack OOB write in compile_item

3 days agolib/unlang/caller: replace placeholder RDEBUG2("...") with a meaningful skip message
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 18:10:21 +0000 (14:10 -0400)] 
lib/unlang/caller: replace placeholder RDEBUG2("...") with a meaningful skip message

3 days agolib/unlang/call_env.h: don't list CALL_ENV_FLAG_PARSE_MISSING as invalid for subsections
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 18:06:56 +0000 (14:06 -0400)] 
lib/unlang/call_env.h: don't list CALL_ENV_FLAG_PARSE_MISSING as invalid for subsections

3 days agolib/tls/verify: check X509_STORE_CTX_new()/init() failure in fr_tls_verify_cert_chain...
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 15:08:03 +0000 (11:08 -0400)] 
lib/tls/verify: check X509_STORE_CTX_new()/init() failure in fr_tls_verify_cert_chain (NULL deref)

3 days agolib/tls/strerror.h: remove copy-pasted _marker param from fr_tls_strerror_push_chain doc
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 14:39:18 +0000 (10:39 -0400)] 
lib/tls/strerror.h: remove copy-pasted _marker param from fr_tls_strerror_push_chain doc

3 days agolib/tls/virtual_server: detach child on all fr_tls_call_push failure paths (double...
Alexander Bainbridge-Sedivy [Mon, 20 Jul 2026 13:39:43 +0000 (09:39 -0400)] 
lib/tls/virtual_server: detach child on all fr_tls_call_push failure paths (double-free)

3 days agolib/unlang/action.h: wrap RETURN_UNLANG_ACTION_FATAL in do{}while(0) like sibling...
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 20:53:28 +0000 (16:53 -0400)] 
lib/unlang/action.h: wrap RETURN_UNLANG_ACTION_FATAL in do{}while(0) like sibling macros

3 days agolib/tls/verify.h: fix copy-pasted validate.h name in @file tag and RCSIDH identifier
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 20:38:08 +0000 (16:38 -0400)] 
lib/tls/verify.h: fix copy-pasted validate.h name in @file tag and RCSIDH identifier

3 days agotls/utils: fix misleading byte count in asn1time_to_epoch error message
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 20:28:43 +0000 (16:28 -0400)] 
tls/utils: fix misleading byte count in asn1time_to_epoch error message

3 days agolib/tls/engine: pass dlist head by pointer in fr_tls_engine_init (missing &)
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 18:45:26 +0000 (14:45 -0400)] 
lib/tls/engine: pass dlist head by pointer in fr_tls_engine_init (missing &)

3 days agolib/tls/conf: signed-char comparison truncates non-ASCII private-key passphrase ...
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 17:53:00 +0000 (13:53 -0400)] 
lib/tls/conf: signed-char comparison truncates non-ASCII private-key passphrase (certadmin path)

3 days agolib/tls/bio: clear dangling dbuff_out.buff in fr_tls_bio_dbuff_thread_local_clear...
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 15:37:26 +0000 (11:37 -0400)] 
lib/tls/bio: clear dangling dbuff_out.buff in fr_tls_bio_dbuff_thread_local_clear (double-free / assert)

3 days agolib/tls/base: fix pthread_attr_getstacksize error check (< 0 never true; use != 0)
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 14:55:26 +0000 (10:55 -0400)] 
lib/tls/base: fix pthread_attr_getstacksize error check (< 0 never true; use != 0)

3 days agolib/sim/milenage.h: include <stdint.h> for uint8_t/uint64_t instead of <stddef.h>
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 14:38:11 +0000 (10:38 -0400)] 
lib/sim/milenage.h: include <stdint.h> for uint8_t/uint64_t instead of <stddef.h>

3 days agolib/server/virtual_servers.h: remove meaningless CC_HINT(nonnull) from void-argument...
Alexander Bainbridge-Sedivy [Fri, 17 Jul 2026 14:17:57 +0000 (10:17 -0400)] 
lib/server/virtual_servers.h: remove meaningless CC_HINT(nonnull) from void-argument functions

3 days agolib/server/virtual_servers: clear fr_value_box on error paths in define_server_values...
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 20:46:36 +0000 (16:46 -0400)] 
lib/server/virtual_servers: clear fr_value_box on error paths in define_server_values (leak)

3 days agotrunk: don't leak connection pause on early return in requests_dequeue SENT loop
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 19:54:34 +0000 (15:54 -0400)] 
trunk: don't leak connection pause on early return in requests_dequeue SENT loop

3 days agotrigger: always add Trigger-Name to the request, not only when args are passed
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 19:08:38 +0000 (15:08 -0400)] 
trigger: always add Trigger-Name to the request, not only when args are passed

3 days agotmpl.h: fix incorrect doc for TMPL_ATTR_ERROR_UNKNOWN_NOT_ALLOWED (nonexistent 'disal...
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 15:48:11 +0000 (11:48 -0400)] 
tmpl.h: fix incorrect doc for TMPL_ATTR_ERROR_UNKNOWN_NOT_ALLOWED (nonexistent 'disallow_internal', 'is trie' typo)

3 days agosnmp.c: add missing NULL check on fr_dcursor_current() in SET path of snmp_process_leaf
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 15:07:42 +0000 (11:07 -0400)] 
snmp.c: add missing NULL check on fr_dcursor_current() in SET path of snmp_process_leaf

3 days agolib/server/request.h: REQUEST_MASTER_NUM_STATES references nonexistent REQUEST_COUNTE...
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 14:52:11 +0000 (10:52 -0400)] 
lib/server/request.h: REQUEST_MASTER_NUM_STATES references nonexistent REQUEST_COUNTED (fails to compile if used)

3 days agolib/server/request: NULL deref in request_log_init_detachable when parent has no...
Alexander Bainbridge-Sedivy [Wed, 15 Jul 2026 14:27:10 +0000 (10:27 -0400)] 
lib/server/request: NULL deref in request_log_init_detachable when parent has no log destination

3 days agolib/server/packet: don't create malformed Net.Src.IP/Net.Dst.IP when address family...
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 19:17:26 +0000 (15:17 -0400)] 
lib/server/packet: don't create malformed Net.Src.IP/Net.Dst.IP when address family is unset (ignored fr_value_box_ipaddr return)

3 days agolib/server/module.h: misplaced semicolon drops warn_unused_result from module_instanc...
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 18:01:29 +0000 (14:01 -0400)] 
lib/server/module.h: misplaced semicolon drops warn_unused_result from module_instance_root

3 days agolib/server/module: fix inverted @return docs on module_instance_skip_* helpers
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 17:49:37 +0000 (13:49 -0400)] 
lib/server/module: fix inverted @return docs on module_instance_skip_* helpers

3 days agolib/server/map_proc_priv.h: remove duplicate map_proc.h include
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 16:28:23 +0000 (12:28 -0400)] 
lib/server/map_proc_priv.h: remove duplicate map_proc.h include

3 days agofix off-by-one snprintf size in xlat_config_escape truncating last hex escape
Alan T. DeKok [Thu, 30 Jul 2026 14:29:23 +0000 (10:29 -0400)] 
fix off-by-one snprintf size in xlat_config_escape truncating last hex escape

add a "+1" to "end", to match the talloc() size.  Without this, the
final hex code might be truncated.  Because snprintf() will add a
trailing '\0'

3 days agolib/server/log.h: fix L_DBG_ERRR typo in EDEBUGX (undeclared identifier if used)
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 15:14:29 +0000 (11:14 -0400)] 
lib/server/log.h: fix L_DBG_ERRR typo in EDEBUGX (undeclared identifier if used)

3 days agolog.c: log_request_perror passes original va_list instead of the va_copy (completes...
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 15:07:54 +0000 (11:07 -0400)] 
log.c: log_request_perror passes original va_list instead of the va_copy (completes #247)

3 days agolib/server: propagate global_lib_instantiate() failure during bootstrap
Alexander Bainbridge-Sedivy [Mon, 13 Jul 2026 14:45:28 +0000 (10:45 -0400)] 
lib/server: propagate global_lib_instantiate() failure during bootstrap

6 days agolisten: disarm the timers when closing a virtual listener developer/arr2036
Arran Cudbard-Bell [Tue, 28 Jul 2026 01:07:22 +0000 (19:07 -0600)] 
listen: disarm the timers when closing a virtual listener

proto_load_step and proto_cron_crontab drive themselves from timers rather than from their fd, and neither had a close callback, so nothing stopped them when the listener was closed. The load generator kept manufacturing packets and handing them to fr_network_send_request() after the network had signalled the workers to close, which the assert added there caught.

Both now close the fd and remove their timer.  Of the remaining app_io modules with timers, proto_detail_file, proto_detail_work and proto_ldap_sync_ldap have a close callback that does not obviously disarm anything, and are worth a look.

6 days agoconfigure: fix the valgrind.h header check path
Arran Cudbard-Bell [Mon, 27 Jul 2026 14:57:45 +0000 (08:57 -0600)] 
configure: fix the valgrind.h header check path

53bfbf591b updated configure.ac from valgrind.h to valgrind/valgrind.h, but hand-edited the generated configure rather than regenerating it, and typo'd the path as "valgind/valgrind.h". The cache variable name is spelled correctly, so only the check itself was broken.

HAVE_VALGRIND_VALGRIND_H has therefore been undefined since, which means RUNNING_ON_VALGRIND falls back to the 0 stub: dl.c dlcloses modules even under valgrind, losing the symbols of unloaded code, and radiusd -Xxv reports runtime-valgrind as false while running under it.

6 days agoio: stop queueing requests to workers once the close has been signalled
Arran Cudbard-Bell [Mon, 27 Jul 2026 06:59:28 +0000 (00:59 -0600)] 
io: stop queueing requests to workers once the close has been signalled

worker.c asserts that the network adds nothing to a channel after FR_CHANNEL_CLOSE, but nothing enforced it. A packet queued between the signal and the worker acking is discarded by the worker without a reply, so the network never decrements the socket's outstanding count for it, and the socket can then never be freed.

nr->exiting is now set before the workers are signalled rather than after, and fr_network_send_request() - the single funnel all three senders go through - asserts it is clear. The listeners are closed before the signal, so a socket read cannot reach there; anything that does is a path worth seeing a backtrace for, and release builds still just drop the packet.

6 days agoio: hand back requests still queued when a responder closes its channel
Arran Cudbard-Bell [Mon, 27 Jul 2026 06:53:09 +0000 (00:53 -0600)] 
io: hand back requests still queued when a responder closes its channel

The worker cancelled the requests it had already popped, but anything still sitting in the channel's atomic queue was abandoned: after the ack the channel is gone, so those messages were never marked done, and the ring buffer they came from could not be reclaimed.

fr_channel_responder_discard() drains what is left and marks it done, called just before the ack. It is a safety net rather than a fix, and warns when it finds anything: the network is not supposed to enqueue once it has signalled the close, which is what worker.c's own "Network added messages to channel after sending FR_CHANNEL_CLOSE" assert claims, and a discarded request produces no reply, so the network never decrements its outstanding count for it and the socket cannot be freed regardless.

6 days agoio: free the network sockets only once the workers have acked the close
Arran Cudbard-Bell [Mon, 27 Jul 2026 06:02:35 +0000 (00:02 -0600)] 
io: free the network sockets only once the workers have acked the close

A socket's message set backs every request queued to a worker, so freeing the socket while a worker still holds one leaves it reading poisoned memory: it faults in worker_request_bootstrap() on a cd->listen of 0x4242424242424242, which is non-canonical and so presents as a GPF rather than an ordinary SIGSEGV. fr_network_destroy() now closes the sockets and leaves them allocated, and fr_network() frees them after its loop, which already runs until every worker has acked for the same reason.

The reply drain stays where it was, before the workers are signalled, because that side of the ordering is the mirror image: replies live in the workers' message sets, which they free as they exit, so we have to be finished with those first.

6 days agoio: separate closing a network socket from freeing it
Arran Cudbard-Bell [Mon, 27 Jul 2026 05:34:13 +0000 (23:34 -0600)] 
io: separate closing a network socket from freeing it

Freeing a socket frees s->ms, but the workers hold messages allocated from it until they ack the channel close, so the descriptor and the memory cannot share a lifetime. network_socket_close() takes the event removal and the close, the destructor asserts it has already run, and the socket keeps the handle fr_event_fd_insert() gave it rather than tracking whether it has one.

The event is now parented off the socket rather than the network, so it cannot outlive the socket that owns the handle even if a path forgets to close. fr_network_socket_dead() closes up front, since nothing writes to a dead socket, and the remaining free sites close immediately beforehand, so the descriptor is released no later than before. fr_network_destroy() is still wrong - it frees the sockets before signalling the workers at all - but it no longer zeroes s->outstanding to hide it.

6 days agoci: gate the automatic merge on the DEB, RPM and sanitizer legs too
Arran Cudbard-Bell [Mon, 27 Jul 2026 00:10:21 +0000 (18:10 -0600)] 
ci: gate the automatic merge on the DEB, RPM and sanitizer legs too

The merge ran as a job at the end of CI with needs: ci, which only waited for CI itself because needs: cannot reach jobs in another workflow. A red DEB, RPM or sanitizer leg did not stop a developer branch reaching master.

Moved to its own workflow_run workflow instead. That fires once per gating workflow completion rather than once when they have all finished, so it runs several times per commit and does nothing until the last leg lands, which avoids a job sitting in a poll loop holding a runner. It now merges the commit the workflows ran on rather than the branch ref, so a branch that moved on since cannot put an unvalidated commit onto master.

6 days agosupport CONF_FLAG_REF in radmod2json
Alan T. DeKok [Mon, 27 Jul 2026 19:04:07 +0000 (15:04 -0400)] 
support CONF_FLAG_REF in radmod2json

6 days agoallow for CF_IDENT_ANY in radmod2json
Alan T. DeKok [Mon, 27 Jul 2026 18:58:00 +0000 (14:58 -0400)] 
allow for CF_IDENT_ANY in radmod2json

6 days agoadd wrappers for rad*2json binaries
Alan T. DeKok [Mon, 27 Jul 2026 13:56:11 +0000 (09:56 -0400)] 
add wrappers for rad*2json binaries

6 days agocall unlang_global_init() to get the xlat tree registered
Alan T. DeKok [Mon, 27 Jul 2026 13:51:10 +0000 (09:51 -0400)] 
call unlang_global_init() to get the xlat tree registered

6 days agoignore fuzzer corpus directories
Alan T. DeKok [Mon, 27 Jul 2026 13:00:56 +0000 (09:00 -0400)] 
ignore fuzzer corpus directories

we track the tar files, not the directories

6 days agoignore auto-generated fuzzer files
Alan T. DeKok [Mon, 27 Jul 2026 12:58:47 +0000 (08:58 -0400)] 
ignore auto-generated fuzzer files

6 days agoignore editor tmp files and pycache, etc.
Alan T. DeKok [Mon, 27 Jul 2026 12:58:24 +0000 (08:58 -0400)] 
ignore editor tmp files and pycache, etc.

7 days agoconnection: expose is_closed so a closed connection's handle can't be used
Arran Cudbard-Bell [Sun, 26 Jul 2026 22:13:49 +0000 (16:13 -0600)] 
connection: expose is_closed so a closed connection's handle can't be used

The close callback frees the handle, but is_closed lived in the private struct so drivers had no way to tell a live connection from a dead one. A mysql connection dying mid-query aborted on talloc_get_type_abort() in sql_error(), reached from sql_get_map_list_resume() after the trunk had already closed the connection.

rlm_sql_print_error() is the only caller of driver->sql_error, and every driver reads the errors off the handle, so the check goes there once and reports "Connection closed" rather than in each driver.

7 days agoio: stop resignalling a channel end we have told to close
Arran Cudbard-Bell [Sun, 26 Jul 2026 16:31:41 +0000 (10:31 -0600)] 
io: stop resignalling a channel end we have told to close

7 days agotransition to new trunk state when a connection changes state
Alan T. DeKok [Sun, 26 Jul 2026 15:56:14 +0000 (11:56 -0400)] 
transition to new trunk state when a connection changes state

and add tests

7 days agoadd new trunk states FULL and FAILED.
Alan T. DeKok [Sun, 26 Jul 2026 15:29:30 +0000 (11:29 -0400)] 
add new trunk states FULL and FAILED.

for when the trunk can accept no more input, due to it being
either at capacity, or if all connections have failed

7 days agomove trunk state update code into common function
Alan T. DeKok [Sun, 26 Jul 2026 15:25:05 +0000 (11:25 -0400)] 
move trunk state update code into common function

so that it can be re-used when a connection state changes

7 days agoclarify comment
Alan T. DeKok [Sun, 26 Jul 2026 15:24:52 +0000 (11:24 -0400)] 
clarify comment

7 days agodetermine dictionary for virtual modules
Alan T. DeKok [Sun, 26 Jul 2026 15:06:38 +0000 (11:06 -0400)] 
determine dictionary for virtual modules

by walking through the entire block, not just the top-level ones.
this makes the function more robust for things like redundant
containing load-balance.

7 days agomove log iterator to header file
Alan T. DeKok [Sun, 26 Jul 2026 15:05:42 +0000 (11:05 -0400)] 
move log iterator to header file

7 days agocache load-balance children in an array, and use "power of two"
Alan T. DeKok [Sun, 26 Jul 2026 15:02:43 +0000 (11:02 -0400)] 
cache load-balance children in an array, and use "power of two"

so that we don't need to walk the array each time

7 days agoadd function to export internal thread-specific tracking information
Alan T. DeKok [Sun, 26 Jul 2026 15:01:53 +0000 (11:01 -0400)] 
add function to export internal thread-specific tracking information

7 days agouse macro instead of hand-rolled loop
Alan T. DeKok [Sun, 26 Jul 2026 14:27:40 +0000 (10:27 -0400)] 
use macro instead of hand-rolled loop

7 days agorename perf counters and tweak fields for instructions
Alan T. DeKok [Sun, 26 Jul 2026 10:31:11 +0000 (06:31 -0400)] 
rename perf counters and tweak fields for instructions

so that the number of "active" users of this instruction also
include yielded ones.

We need this functionality for better load balancing

7 days agomove extension checks to table for binary search
Alan T. DeKok [Sat, 25 Jul 2026 23:36:04 +0000 (19:36 -0400)] 
move extension checks to table for binary search

and add documentation files

8 days agomulti-server: never publish profiling results from an unclean valgrind exit
Arran Cudbard-Bell [Sun, 26 Jul 2026 02:00:56 +0000 (20:00 -0600)] 
multi-server: never publish profiling results from an unclean valgrind exit

Run 30180044334 published results from two suites where valgrind had killed
FreeRADIUS partway through. Callgrind output from a killed run is truncated at
whatever point it died, so the numbers are not comparable with a clean run, and
publishing them poisons the per-suite history the regression gate compares
against.

start_valgrind_profiling.sh now records valgrind's exit status in
valgrind-exit-status alongside the rest of a test's results, and says loudly
when the status means a signal. The status is written for clean runs too, so an
absent file means the wrapper never got that far rather than that the run was
fine.

publish-profiling-results.sh refuses to publish when any test's status is
non-zero, naming each suite and status, and exits non-zero so the leg goes red
rather than passing having uploaded nothing. Trees with no status file at all
publish as before.

The status file is small and travels with the results, so the store keeps the
provenance of every published run.

8 days agoci: collect core dumps as artifacts, keep them out of the profiling publish
Arran Cudbard-Bell [Sun, 26 Jul 2026 01:19:53 +0000 (19:19 -0600)] 
ci: collect core dumps as artifacts, keep them out of the profiling publish

Most suites run with allow_core_dumps = yes, but nothing in CI ever collected
a core, so the only record of a crash the logs cannot reconstruct was thrown
away with the runner.

scripts/ci/collect-core-dumps.sh stages cores into ci-core-dumps/, preserving
each path below the searched root so the suite that crashed stays identifiable.
The new .github/actions/collect-core-dumps composite action calls the script and
uploads the result, and ci, ci-sanitizers, ci-macos, ci-deb, ci-rpm and
ci-multi-server-tests all use it. Collection runs on success as well as failure:
FreeRADIUS crashing during shutdown does not necessarily fail the suite that
provoked the crash, which is how run 30180044334 reported success while dumping
two 1.5G cores.

publish-profiling-results.sh now drops cores from the store tarball. Those two
cores turned a 6M publish into 35M of mostly-zero pages, the store's synchronous
ingest then ran ~64s, and wproxy's 60s proxy_read_timeout returned a 504 for a
publish that had in fact landed. The multi-server leg passes move: true so a
core leaves prof-results/ and rides one artifact rather than inflating the
prof-results artifact too. Exclusions are always logged with their sizes; a
silently shrunk publish would be worse than a noisy one.

The shared name patterns live in scripts/ci/core-dump-names.inc so the script
that keeps cores and the script that drops them cannot disagree.

Not covered: ci-freebsd, whose VM syncs runner-to-vm only, and the fuzzing leg,
which has its own crash artifacts. Whether a core is written at all still
depends on the ambient RLIMIT_CORE and kernel.core_pattern, neither of which CI
sets; allow_core_dumps only restores the limit FreeRADIUS inherited.

8 days agobuild: categorise library targets via TGT_CATEGORY
Arran Cudbard-Bell [Sun, 26 Jul 2026 00:26:08 +0000 (18:26 -0600)] 
build: categorise library targets via TGT_CATEGORY

Library-producing makefile fragments declare a category next to
TARGET: lib-protocol for the wire codecs under src/protocols, and
lib-util for the other support libraries.  Modules, listeners and
binaries stay uncategorised for now.

One declaration per fragment, placed after the last TARGET
assignment or probe include and outside any conditional, so the
fragment's own value wins over one dragged in by textually including
another fragment (the configure-probe pattern used by rlm_json and
friends).  Fragments which probe but aren't libraries keep a bare
'TGT_CATEGORY :=' reset for the same reason.  Configure-generated
fragments carry the declaration in their all.mk.in template.

boiler.mk only gains generic plumbing: the TGT_CATEGORY passthrough
and a CATEGORY_TARGETS macro which expands to all targets in the
given categories.

'make library.list' prints '<category> <name>' pairs - the first
authoritative list of the libraries the build produces, usable to
keep the debian/redhat packaging manifests honest.  Census:
14 lib-protocol, 18 lib-util.

src/stats/all.mk now derives the radict chain-load dependencies from
CATEGORY_TARGETS instead of name-prefix filtering ALL_TGTS.

8 days agoCorrectly record dl errors
Arran Cudbard-Bell [Sun, 26 Jul 2026 00:10:43 +0000 (18:10 -0600)] 
Correctly record dl errors

8 days agobuild: stats generation depends on the dhcpv4/dhcpv6 libraries
Arran Cudbard-Bell [Sat, 25 Jul 2026 23:47:50 +0000 (17:47 -0600)] 
build: stats generation depends on the dhcpv4/dhcpv6 libraries

radict chain-loads the DHCPv4 and DHCPv6 dictionary validation
libraries while parsing the RADIUS dictionaries (dictionary.rfc9445
has ref=@DHCPv4 / ref=@DHCPv6), but the DICT_STATS rules only
depended on libfreeradius-radius and radict itself, so a parallel
build could run radict before those libraries were linked and fail
with "cannot open shared object file", as seen intermittently on the
rocky10 service image build.

8 days agoradiusd: only SIGTERM the process group when we lead it
Arran Cudbard-Bell [Sat, 25 Jul 2026 22:40:48 +0000 (16:40 -0600)] 
radiusd: only SIGTERM the process group when we lead it

The shutdown group-wide SIGTERM exists to reap children left over
from exec calls and triggers.  When radiusd is daemonized (setsid),
or given its own group by systemd or a container runtime, the group
contains only radiusd and its children and the signal is safe.  Run
in the foreground from a shell, the group belongs to the shell, and
the signal killed the shell and its terminal too.

8 days agomulti-server: drive proto_load with max_requests / on_complete
Arran Cudbard-Bell [Sat, 25 Jul 2026 22:40:48 +0000 (16:40 -0600)] 
multi-server: drive proto_load with max_requests / on_complete

The listen configs previously set 'num_messages' inside step { },
which nothing parsed, and relied on the wall-clock ramp to produce
the expected packet count - a few skipped timer slots on a loaded CI
runner meant fewer packets than the consumers expected, and flaky
kafka-produce failures.

Point the new max_requests knob at the per-test count and rename the
env var TEST_LOADGEN_NUM_MESSAGES to TEST_LOADGEN_MAX_REQUESTS to
match.  on_complete = stop keeps the servers running for the rest of
each test.

8 days agoproto_load: replace 'repeat' with 'on_complete', add 'max_requests'
Arran Cudbard-Bell [Sat, 25 Jul 2026 22:40:35 +0000 (16:40 -0600)] 
proto_load: replace 'repeat' with 'on_complete', add 'max_requests'

The load test is now complete when the PPS ramp has passed max_pps,
max_requests packets (if set) have been sent, and every reply has
arrived.  With max_requests set the generator holds the rate at
max_pps after the ramp instead of stopping, so tests get an exact,
predictable packet count even when a busy machine makes the timer
skip send slots.

on_complete = (exit|repeat|stop|continue) replaces the undocumented
'repeat' knob and controls what happens on completion.  The default
'exit' terminates the server.  'continue' holds at max_pps forever
and cannot be combined with max_requests.

Completion is also now signalled when the final reply arrives before
the generator stops sending - previously that race left the listener
waiting forever.

8 days agoscripts/docker: snapshot dnf mirrorlists at image build time
Arran Cudbard-Bell [Sat, 25 Jul 2026 22:27:59 +0000 (16:27 -0600)] 
scripts/docker: snapshot dnf mirrorlists at image build time

The mirrors.rockylinux.org / mirrors.fedoraproject.org redirectors
occasionally answer with an empty mirror set, which dnf reports as "No
URLs in mirrorlist" and treats as fatal rather than retryable, so each
mirror list is now fetched once at image build time into
/etc/dnf/mirrorlists/<repo> and the enabled repos point at the
snapshot with mirrorlist=file:// (explicitly supported by librepo,
mirrors tried in file order). The origin CDN leads each snapshot so
the fetched mirrors are failover only, minor-versioned paths are
rewritten to the major-version symlink form so a snapshot survives
point releases, and the unused metalink-only epel-cisco-openh264 repo
is disabled.

8 days agopolicy: filter_username rejects User-Names containing an xlat opener
Arran Cudbard-Bell [Sat, 25 Jul 2026 18:37:59 +0000 (12:37 -0600)] 
policy: filter_username rejects User-Names containing an xlat opener

Reject the '%{' and '%name(' expansion openers in User-Name so there's no chance of poorly written API code reflecting them back and having nested evaluation occur.

This is a belt and braces change, as expansion defaults to disabled in v4 for the rest module, and it's somewhat unlikely that an admin woul insert one of these raw values into an SQL policy.  It's probably unecessary but at least it quiets the CVE farmers.

8 days agorlm_rest: tests for the response do_xlat and is_json defaults
Arran Cudbard-Bell [Sat, 25 Jul 2026 17:24:56 +0000 (11:24 -0600)] 
rlm_rest: tests for the response do_xlat and is_json defaults

Covers the JSON decoder (default off, do_xlat = yes, per-attribute
overrides in both directions, nested JSON with and without is_json)
and the POST decoder (default off, do_xlat = yes).

The mock API gains a /user/<username>/expand/ JSON endpoint and a
/post/expand reflector, both returning values containing xlat
expansions so the tests can verify whether the server expanded them.