]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
2 months agoAdd tests of rlm_dpsk auth
Nick Porter [Thu, 14 Aug 2025 07:48:45 +0000 (08:48 +0100)] 
Add tests of rlm_dpsk auth

2 months agoPort rlm_dpsk autz and auth from v3.2.x
Nick Porter [Thu, 14 Aug 2025 07:47:44 +0000 (08:47 +0100)] 
Port rlm_dpsk autz and auth from v3.2.x

2 months agoAdd alias to make FR DPSK attributes more friendly
Nick Porter [Thu, 14 Aug 2025 10:16:45 +0000 (11:16 +0100)] 
Add alias to make FR DPSK attributes more friendly

2 months agoAdd internal attributes to support DPSK
Nick Porter [Thu, 14 Aug 2025 07:41:41 +0000 (08:41 +0100)] 
Add internal attributes to support DPSK

2 months agoPlace all md4/md5 functions in a struct and swap the pointer where we're building...
Arran Cudbard-Bell [Wed, 13 Aug 2025 02:17:44 +0000 (20:17 -0600)] 
Place all md4/md5 functions in a struct and swap the pointer where we're building with OpenSSL !fips

This prevents potential skew during startup

2 months agoRemove errant exdents
Arran Cudbard-Bell [Wed, 13 Aug 2025 00:23:29 +0000 (18:23 -0600)] 
Remove errant exdents

2 months agoTypo
Arran Cudbard-Bell [Wed, 13 Aug 2025 00:18:07 +0000 (18:18 -0600)] 
Typo

2 months agoFix %internal.encode()
Arran Cudbard-Bell [Tue, 12 Aug 2025 23:07:23 +0000 (17:07 -0600)] 
Fix %internal.encode()

The xlat previously seemed to truncate output and skipped every other attribute

2 months agoTemporarily disable casting to? from? FR_TYPE_ATTR
Arran Cudbard-Bell [Tue, 12 Aug 2025 23:05:03 +0000 (17:05 -0600)] 
Temporarily disable casting to? from? FR_TYPE_ATTR

Code doesn't really make any sense, and it's apparently not exercised.

2 months agoFix tmpl dcursor so that fr_dcursor_head resets the iteration state
Arran Cudbard-Bell [Tue, 12 Aug 2025 23:04:26 +0000 (17:04 -0600)] 
Fix tmpl dcursor so that fr_dcursor_head resets the iteration state

2 months agoredo "fips=no" to "-fips"
Alan T. DeKok [Tue, 12 Aug 2025 16:53:27 +0000 (12:53 -0400)] 
redo "fips=no" to "-fips"

as per commit 59e262 in the v3.2.x branch.

and don't document the openssl_fips_mode flag.  No one in their
right mind needs to be enabling or disabling FIPS mode for just
one application

2 months agoRevert "change "fips=no" to "-fips""
Alan T. DeKok [Tue, 12 Aug 2025 16:52:49 +0000 (12:52 -0400)] 
Revert "change "fips=no" to "-fips""

This reverts commit 4340edae652b086078e8000a91899c3c73bd4e2b.

2 months agojust swap out the function pointer the first time we check
Alan T. DeKok [Tue, 12 Aug 2025 15:21:47 +0000 (11:21 -0400)] 
just swap out the function pointer the first time we check

so that we don't check an intermediate variable

2 months agouse macro for common name
Alan T. DeKok [Tue, 12 Aug 2025 11:06:31 +0000 (07:06 -0400)] 
use macro for common name

2 months agoAdd Debian 13 to Docker / Crossbuild tests
Nick Porter [Mon, 11 Aug 2025 15:35:38 +0000 (16:35 +0100)] 
Add Debian 13 to Docker / Crossbuild tests

2 months agoAdd Debian 13 to CI tests
Nick Porter [Mon, 11 Aug 2025 15:27:23 +0000 (16:27 +0100)] 
Add Debian 13 to CI tests

2 months agoDebian sid now report "forky"
Nick Porter [Mon, 11 Aug 2025 15:26:56 +0000 (16:26 +0100)] 
Debian sid now report "forky"

2 months agochange "fips=no" to "-fips"
Alan T. DeKok [Mon, 11 Aug 2025 15:00:29 +0000 (11:00 -0400)] 
change "fips=no" to "-fips"

based on discussions with the OpenSSL developers in

https://github.com/FreeRADIUS/freeradius-server/issues/5631

and

https://docs.openssl.org/3.5/man7/property/#global-and-local

2 months agouse native OSX data types
Alan T. DeKok [Sun, 10 Aug 2025 12:08:07 +0000 (08:08 -0400)] 
use native OSX data types

which despite the name "UInt32", are actually of different size
on different platforms.

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sun, 10 Aug 2025 04:46:47 +0000 (04:46 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sun, 10 Aug 2025 04:42:07 +0000 (04:42 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sun, 10 Aug 2025 04:41:13 +0000 (04:41 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sun, 10 Aug 2025 04:40:25 +0000 (04:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sun, 10 Aug 2025 04:40:16 +0000 (04:40 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:59 +0000 (04:39 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:49 +0000 (04:39 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:46 +0000 (04:39 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar

2 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:41 +0000 (04:39 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar

2 months agoadd more tests to check triggers
Alan T. DeKok [Fri, 8 Aug 2025 14:08:05 +0000 (10:08 -0400)] 
add more tests to check triggers

2 months agoUse enum to determine where limited port connections are tracked
Nick Porter [Fri, 8 Aug 2025 11:02:08 +0000 (12:02 +0100)] 
Use enum to determine where limited port connections are tracked

2 months agoAllocate array of connection pointers for static home servers
Nick Porter [Fri, 8 Aug 2025 11:00:33 +0000 (12:00 +0100)] 
Allocate array of connection pointers for static home servers

2 months agoPopulate and use num_ports in bio_thread_t
Nick Porter [Fri, 8 Aug 2025 10:58:35 +0000 (11:58 +0100)] 
Populate and use num_ports in bio_thread_t

2 months agoAdd num_ports and connections to bio_thread_t
Nick Porter [Fri, 8 Aug 2025 10:55:22 +0000 (11:55 +0100)] 
Add num_ports and connections to bio_thread_t

For tracking source port usage with static home servers

2 months agoSplit source port range and set reuse_port for all rlm_radius proxy modes
Nick Porter [Fri, 8 Aug 2025 10:52:46 +0000 (11:52 +0100)] 
Split source port range and set reuse_port for all rlm_radius proxy modes

2 months agoIf the request has timed out request->timeout is cleared
Nick Porter [Fri, 8 Aug 2025 09:39:39 +0000 (10:39 +0100)] 
If the request has timed out request->timeout is cleared

2 months agoEnsure limits are checked regardless of restricted source port range
Nick Porter [Fri, 8 Aug 2025 08:08:15 +0000 (09:08 +0100)] 
Ensure limits are checked regardless of restricted source port range

2 months agoRemove duplicate check
Nick Porter [Fri, 8 Aug 2025 07:58:58 +0000 (08:58 +0100)] 
Remove duplicate check

2 months agoIncrease retry timer limits for rlm_radius auth requests
Nick Porter [Fri, 8 Aug 2025 07:47:53 +0000 (08:47 +0100)] 
Increase retry timer limits for rlm_radius auth requests

Sometimes it is known that a home server will be slow to respond e.g. if
external MFA is involved that requires user intervention.

2 months agoEnable new source port limiting for %radius.sendto.ipaddr()
Nick Porter [Thu, 7 Aug 2025 16:39:15 +0000 (17:39 +0100)] 
Enable new source port limiting for %radius.sendto.ipaddr()

Now tested to multiple home servers under load

2 months agoRemove reference to files not in the packages
Nick Porter [Thu, 7 Aug 2025 16:12:57 +0000 (17:12 +0100)] 
Remove reference to files not in the packages

2 months agocatch pop on running trigger, with empty stack
Alan T. DeKok [Thu, 7 Aug 2025 15:24:18 +0000 (11:24 -0400)] 
catch pop on running trigger, with empty stack

2 months agoon TCP EOF, flush all writes, and shut down the BIOs
Alan T. DeKok [Thu, 7 Aug 2025 14:59:17 +0000 (10:59 -0400)] 
on TCP EOF, flush all writes, and shut down the BIOs

2 months agowe don't need separate read / write BIOs
Alan T. DeKok [Thu, 7 Aug 2025 14:58:53 +0000 (10:58 -0400)] 
we don't need separate read / write BIOs

2 months agoEOF is not always an error case
Alan T. DeKok [Thu, 7 Aug 2025 14:43:19 +0000 (10:43 -0400)] 
EOF is not always an error case

From the docs:

> If the read direction of the socket has shutdown, then the filter
> also sets EV_EOF in flags, and returns the socket error (if any) in
> fflags. It is possible for EOF to be returned (indicating the
> connection is gone) while there is still data pending in the socket
> buffer.

So we suppress printing an error on normal EOF.  Instead, we just
see if we need to reconnect the socket.

Arguably if the other end closes our read side, we _might_ be able
to write to the socket?  but we could still write to it.

2 months agocheck corner cases
Alan T. DeKok [Thu, 7 Aug 2025 14:16:09 +0000 (10:16 -0400)] 
check corner cases

we can't starve threads of ports :(

2 months agojust pass errors through on read / write
Alan T. DeKok [Thu, 7 Aug 2025 12:34:32 +0000 (08:34 -0400)] 
just pass errors through on read / write

the underlying BIO should call fr_bio_shutdown() if there is a
fatal error.

2 months agovirtual_server_cf_parse returns a virtual_server_t not a CONF_SECTION
Nick Porter [Thu, 7 Aug 2025 11:25:43 +0000 (12:25 +0100)] 
virtual_server_cf_parse returns a virtual_server_t not a CONF_SECTION

2 months agoUse the thread source port range, rather than the instance
Nick Porter [Wed, 6 Aug 2025 14:54:01 +0000 (15:54 +0100)] 
Use the thread source port range, rather than the instance

2 months agoSplit the restricted source port range per thread
Nick Porter [Wed, 6 Aug 2025 14:53:13 +0000 (15:53 +0100)] 
Split the restricted source port range per thread

2 months agoWe do use SO_REUSEPORT for some clients
Nick Porter [Wed, 6 Aug 2025 12:58:27 +0000 (13:58 +0100)] 
We do use SO_REUSEPORT for some clients

2 months agoOnly unlink bio if it is in a chain
Nick Porter [Thu, 7 Aug 2025 10:45:17 +0000 (11:45 +0100)] 
Only unlink bio if it is in a chain

2 months agoCorrect bio chain re-link
Nick Porter [Thu, 7 Aug 2025 11:31:20 +0000 (12:31 +0100)] 
Correct bio chain re-link

2 months agoptrs may be NULL
Alan T. DeKok [Thu, 7 Aug 2025 11:03:04 +0000 (07:03 -0400)] 
ptrs may be NULL

2 months agoat least one ptr has to be set
Alan T. DeKok [Thu, 7 Aug 2025 10:26:13 +0000 (06:26 -0400)] 
at least one ptr has to be set

2 months agoset flags before allocating parent
Alan T. DeKok [Thu, 7 Aug 2025 01:20:48 +0000 (21:20 -0400)] 
set flags before allocating parent

and unknown attributes can allocate EXT_VENDOR

which helps with unknown VSAs.  They previously result in a
Vendor-Specific { Foo { } } being allocated, and then an error
returned of "dict is read only".

At that point, the decoder would then create a raw top-level
attribute

2 months agorevisit and clean up destructor vs shutdown
Alan T. DeKok [Wed, 6 Aug 2025 15:43:43 +0000 (11:43 -0400)] 
revisit and clean up destructor vs shutdown

shutdown can be called on fatal error, and only stops the BIO.
the underlying BIO is still there.  This allows it to be called
from a BIO which is in the middle of a chain.

destructor calls shutdown first, and then frees the resources.
this allows a destructor to be called from anywhere, and then the
entire chain is shut down

2 months agoclean up shutdown and destructor
Alan T. DeKok [Wed, 6 Aug 2025 14:59:08 +0000 (10:59 -0400)] 
clean up shutdown and destructor

some shutdowns can fail, so the function needs to return an rcode.

the destructors should just call the shutdown, so the caller can
just talloc_free() things, and have it all work properly.

the shutdown doesn't need to reset the destructors, as the main
fr_bio_shutdown() will do that.

2 months agoupdate sbuff macros to catch more corner cases
Alan T. DeKok [Wed, 6 Aug 2025 12:22:27 +0000 (08:22 -0400)] 
update sbuff macros to catch more corner cases

FR_SBUFF_IN() is for reading from the sbuff.
FR_SBUFF_OUT() is for writing to the sbuff.

Using the same description for both is very confusing.  Allowing
a writeable sbuff to take 'char const*' input is bad.

2 months agohoist common checks to macro
Alan T. DeKok [Wed, 6 Aug 2025 12:22:08 +0000 (08:22 -0400)] 
hoist common checks to macro

2 months agouse the correct sbuff macro.
Alan T. DeKok [Wed, 6 Aug 2025 11:48:23 +0000 (07:48 -0400)] 
use the correct sbuff macro.

OUT is for printing, IN is for parsing pre-existing data.

2 months agouse the correct sbuff macro.
Alan T. DeKok [Wed, 6 Aug 2025 11:48:23 +0000 (07:48 -0400)] 
use the correct sbuff macro.

2 months agoEnsure fr_bio_fd_open returns an error when there is one
Nick Porter [Wed, 6 Aug 2025 08:53:51 +0000 (09:53 +0100)] 
Ensure fr_bio_fd_open returns an error when there is one

2 months agoWS
Arran Cudbard-Bell [Tue, 5 Aug 2025 18:01:17 +0000 (12:01 -0600)] 
WS

2 months agoAdd another Calix VSA we observed in the wild
Arran Cudbard-Bell [Tue, 5 Aug 2025 18:00:55 +0000 (12:00 -0600)] 
Add another Calix VSA we observed in the wild

2 months agoUse better method for un-marshalling Perl values to pairs
Nick Porter [Tue, 5 Aug 2025 14:30:53 +0000 (15:30 +0100)] 
Use better method for un-marshalling Perl values to pairs

2 months agoNo need to talloc a temporary box
Nick Porter [Tue, 5 Aug 2025 13:54:33 +0000 (14:54 +0100)] 
No need to talloc a temporary box

2 months agoCast ruby string length to a consistent type
Nick Porter [Tue, 5 Aug 2025 12:36:31 +0000 (13:36 +0100)] 
Cast ruby string length to a consistent type

2 months agoAdd test using float value in mRuby
Nick Porter [Tue, 5 Aug 2025 11:30:19 +0000 (12:30 +0100)] 
Add test using float value in mRuby

2 months agoBetter method of un-marshalling values from mRuby to FreeRADIUS
Nick Porter [Tue, 5 Aug 2025 11:29:39 +0000 (12:29 +0100)] 
Better method of un-marshalling values from mRuby to FreeRADIUS

2 months agofirst attempt at limiting the source port for %radius.sendto.ipaddr()
Alan T. DeKok [Mon, 4 Aug 2025 21:52:37 +0000 (17:52 -0400)] 
first attempt at limiting the source port for %radius.sendto.ipaddr()

the code is commented out for now, as it is a change of behavior

2 months agofix typo
Alan T. DeKok [Mon, 4 Aug 2025 20:57:10 +0000 (16:57 -0400)] 
fix typo

2 months agoadd documentation for states
Alan T. DeKok [Mon, 4 Aug 2025 20:57:00 +0000 (16:57 -0400)] 
add documentation for states

2 months agoadd function to create total order of attributes
Alan T. DeKok [Mon, 4 Aug 2025 14:44:49 +0000 (10:44 -0400)] 
add function to create total order of attributes

2 months agoUNUSED
Nick Porter [Mon, 4 Aug 2025 18:29:53 +0000 (19:29 +0100)] 
UNUSED

2 months agoFreeBSD has accept4()
Nick Porter [Mon, 4 Aug 2025 18:24:45 +0000 (19:24 +0100)] 
FreeBSD has accept4()

2 months agoEnsure we depend on non-broken libkqueue
Nick Porter [Mon, 4 Aug 2025 17:20:37 +0000 (18:20 +0100)] 
Ensure we depend on non-broken libkqueue

Some .deb platforms package libkqueue 2.3.1

2 months agoSimplify .deb ssl dependency logic
Nick Porter [Mon, 4 Aug 2025 16:38:32 +0000 (17:38 +0100)] 
Simplify .deb ssl dependency logic

since we require OpenSSL >= 3.0

2 months agoadd attribute type 'attr' and test VALUE
Alan T. DeKok [Mon, 4 Aug 2025 13:07:12 +0000 (09:07 -0400)] 
add attribute type 'attr' and test VALUE

not used for anything yet, because the encoder / decoder do not
support it

2 months agoallow '@' references for value box parser
Alan T. DeKok [Mon, 4 Aug 2025 12:49:34 +0000 (08:49 -0400)] 
allow '@' references for value box parser

the reference can't change dictionaries

2 months agoadd da root to value-box parser for VALUE
Alan T. DeKok [Mon, 4 Aug 2025 12:49:06 +0000 (08:49 -0400)] 
add da root to value-box parser for VALUE

2 months agoadd character set for allowed names of nested attrs
Alan T. DeKok [Mon, 4 Aug 2025 12:48:36 +0000 (08:48 -0400)] 
add character set for allowed names of nested attrs

which is the allowed list for attrs, plus '.'

2 months agofix error message
Alan T. DeKok [Mon, 4 Aug 2025 12:27:57 +0000 (08:27 -0400)] 
fix error message

2 months agoexport dict_protocol_reference, and make it take an sbuff
Alan T. DeKok [Sun, 3 Aug 2025 15:36:15 +0000 (11:36 -0400)] 
export dict_protocol_reference, and make it take an sbuff

in preparation for other work with @foo in value-boxes

2 months agouse FR_SBUFF_IN_STR() for common cases
Alan T. DeKok [Sun, 3 Aug 2025 15:18:01 +0000 (11:18 -0400)] 
use FR_SBUFF_IN_STR() for common cases

2 months agodefine FR_SBUFF_IN_STR() as a shorthand for IN(foo, strlen(foo))
Alan T. DeKok [Sun, 3 Aug 2025 15:12:30 +0000 (11:12 -0400)] 
define FR_SBUFF_IN_STR() as a shorthand for IN(foo, strlen(foo))

2 months agodisallow ::43 as enum names
Alan T. DeKok [Sun, 3 Aug 2025 14:56:33 +0000 (10:56 -0400)] 
disallow ::43 as enum names

2 months agodon't allow copying of cursors
Alan T. DeKok [Sat, 2 Aug 2025 10:56:41 +0000 (06:56 -0400)] 
don't allow copying of cursors

2 months agoprint the input expansion before running the function
Alan T. DeKok [Sat, 2 Aug 2025 10:53:19 +0000 (06:53 -0400)] 
print the input expansion before running the function

not afterwards.  this makes it much easier to read the debug output

2 months agoremove ACCEPTED state.
Alan T. DeKok [Sat, 2 Aug 2025 10:48:31 +0000 (06:48 -0400)] 
remove ACCEPTED state.

and more cleanups for accept. We can't re-open an accepted socket

2 months agore-add "char const *end" as allowed
Alan T. DeKok [Fri, 1 Aug 2025 18:45:24 +0000 (14:45 -0400)] 
re-add "char const *end" as allowed

2 months agoadd notes about attribute comparisons
Alan T. DeKok [Fri, 1 Aug 2025 18:36:40 +0000 (14:36 -0400)] 
add notes about attribute comparisons

2 months agohoist initialize output to macro
Alan T. DeKok [Fri, 1 Aug 2025 12:04:05 +0000 (08:04 -0400)] 
hoist initialize output to macro

so we don't have 'ifdef STATIC_ANALYZER' everywhere.  And hopefully
then since the initialization is unconditional, the analyzer will
actually figure out that the output is initialized.

2 months agoremove more "default:", and add more "case FR_TYPE_ATTR:"
Alan T. DeKok [Thu, 31 Jul 2025 17:24:29 +0000 (13:24 -0400)] 
remove more "default:", and add more "case FR_TYPE_ATTR:"

2 months agouse dictionary function to compare two attributes
Alan T. DeKok [Thu, 31 Jul 2025 17:22:02 +0000 (13:22 -0400)] 
use dictionary function to compare two attributes

comparing by only the leaf attr was arguably wrong, as it ignored
any depth or parenting.

we use an fr_dict function to do the comparison.  But that just
compares the pointers, and isn't stable.  Arguably that should
be fixed, too.

The fix depends on whether we want to just sort different attributes,
or whether we want to order them.  If we're just sorting them, then
the current code is OK.

2 months agoadd more size, and assert that max is initialized
Alan T. DeKok [Thu, 31 Jul 2025 17:21:39 +0000 (13:21 -0400)] 
add more size, and assert that max is initialized

2 months agounify unsupported cast code
Alan T. DeKok [Thu, 31 Jul 2025 16:28:43 +0000 (12:28 -0400)] 
unify unsupported cast code

2 months agomove generic to 1, so that returning -1 is better
Alan T. DeKok [Wed, 30 Jul 2025 21:21:52 +0000 (17:21 -0400)] 
move generic to 1, so that returning -1 is better

2 months agodon't allow fr_bio_fd_open() to be passed accepted sockets
Alan T. DeKok [Wed, 30 Jul 2025 11:55:43 +0000 (07:55 -0400)] 
don't allow fr_bio_fd_open() to be passed accepted sockets

we will fix fr_bio_fd_accept() in another commit.

2 months agoremove errant debug call
Arran Cudbard-Bell [Thu, 31 Jul 2025 22:18:55 +0000 (15:18 -0700)] 
remove errant debug call

2 months agoAdopt a standard naming convention and signture for debug functions
James Jones [Fri, 31 Jan 2025 19:56:05 +0000 (13:56 -0600)] 
Adopt a standard naming convention and signture for debug functions

To get the "dd" debugger command to work without having to create an
wxplicit mapping from type to function either by hand or by runtime
inspection (the latter preventing setting up the command at debugger
startup), the debug functions that dd calls should have a type of
the form

    foo_debug(FILE *fp, foo_t const *)

We add the qualifier becausen
 * some support functions with extra parameters are meant to be
   called by these functions, which pass the additional parameters;
   the functions we do call can pass fp along, or in the case of
   src/lib/util/dict_print.c, add fp to the context
 * fe_dict_attr_t * has three debug functions
 * fr_pair_validate_debug() takes a pointer to an array, and
   thus can't follow the convention
 * virtual_server_{listen, process}_debug() and module_rlm_list_debug()
   have *no* parameters