]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Fri, 15 Aug 2025 14:13:05 +0000 (10:13 -0400)]
better checks for BEGIN / END
when a file has BEGIN without END, or END without BEGIN, it's now
caught in more (i.e. all) situations, and has better error
messages
Alan T. DeKok [Fri, 15 Aug 2025 13:25:13 +0000 (09:25 -0400)]
put current filename / line into dctx
so that we don't mangle the filename in the stack frame.
this makes it easier to track which thing is taken from which file.
Nick Porter [Fri, 15 Aug 2025 13:55:13 +0000 (14:55 +0100)]
Don't cause SQL module to fail if sql_user_name expansion produces no result
This will typically be the case in accounting On and Off processing
where there is no User-Name attribute, but the expansion has been set
for use in other packet processing.
Nick Porter [Fri, 15 Aug 2025 13:50:28 +0000 (14:50 +0100)]
Add test of attr_filter where key attribute is missing
Nick Porter [Fri, 15 Aug 2025 13:46:08 +0000 (14:46 +0100)]
Move rlm_attr_filter to use a call_env
And fallback to DEFAULT if the key expansion produces no output.
Alan T. DeKok [Fri, 15 Aug 2025 11:06:29 +0000 (07:06 -0400)]
audit errors for fr_strrror_printf_push() versus ifr_strerror_printf()
we should only call the push function after we have called another
API function which returns an error.
If we do a check ourselves, we should just call the printf()/const()
function. That resets the error stack so we are the first error.
Otherwise when we call push() incorrectly, an old error will
remain on the error stack, leading to confusion
Alan T. DeKok [Fri, 15 Aug 2025 10:58:35 +0000 (06:58 -0400)]
more cleanups
minor formatting / variable use
BEGIN-PROTOCOL can't be used inside of any BEGIN/END block, and
not just inside of another BEGIN-PROTOCOL
use push function for test, instead of manually changing the stack
Alan T. DeKok [Fri, 15 Aug 2025 10:33:50 +0000 (06:33 -0400)]
use macros more often for common things
Alan T. DeKok [Fri, 15 Aug 2025 10:46:02 +0000 (06:46 -0400)]
check and enforce PROTOCOL location
so that we can just push the new protocol, and we don't need
a push_or_update(). Which was wrong, because it incremented the
stack pointer before checking the stack entry
Alan T. DeKok [Fri, 15 Aug 2025 10:29:37 +0000 (06:29 -0400)]
clarify checks
when we have END-, use the unwind function to find the matching
BEGIN-, instead of doing it manually.
when we're done reaading a file, look for unmatched BEGIN, and
remove the corresponding checks from process_include()
Alan T. DeKok [Fri, 15 Aug 2025 10:07:30 +0000 (06:07 -0400)]
no need to smash stack_depth on every iteration
also cleans up corner cases of multiple ifs
Alan T. DeKok [Fri, 15 Aug 2025 02:09:06 +0000 (22:09 -0400)]
make unwind() explicit
Alan T. DeKok [Fri, 15 Aug 2025 00:53:03 +0000 (20:53 -0400)]
use TOP of stack frame, not ROOT
root is already used for root of dictionary, which this is not.
Alan T. DeKok [Fri, 15 Aug 2025 00:11:44 +0000 (20:11 -0400)]
use name instead of bare 0
Alan T. DeKok [Thu, 14 Aug 2025 18:32:10 +0000 (14:32 -0400)]
run through the formatter
Alan T. DeKok [Thu, 14 Aug 2025 18:28:14 +0000 (14:28 -0400)]
just printf, not printf_push
Alan T. DeKok [Thu, 14 Aug 2025 18:16:54 +0000 (14:16 -0400)]
allow STRUCT inside of a BEGIN union-thing
the BEGIN needs to use the full name, which is annoying.
the BEGIN union-thing refers to a union, where we can then find
the key attribute. Which means that the STRUCT doesn't need a
key-name. And therefore STRUCT devolves to ATTRIBUTE in that
case.
Alan T. DeKok [Thu, 14 Aug 2025 14:39:52 +0000 (10:39 -0400)]
no need to use memcpy
Alan T. DeKok [Thu, 14 Aug 2025 10:50:55 +0000 (06:50 -0400)]
allow 'key=ref' for attributes of type UNION
Alan T. DeKok [Wed, 13 Aug 2025 19:21:19 +0000 (15:21 -0400)]
check union type in multiple places
attribute validation:
it can only be parented by a struct, because only structs can have
a key field. Once we have full support for unions and refs, this
restriction can be relaxed
reading the dictionaries:
it can only used in a struct, along with other restrictions
Alan T. DeKok [Thu, 14 Aug 2025 10:57:35 +0000 (06:57 -0400)]
allow union[...] syntax
for size of the union, ala string[1] or octets[1], or struct[1]
Alan T. DeKok [Thu, 14 Aug 2025 13:23:44 +0000 (09:23 -0400)]
define EXT_KEY, to mirror EXT_REF
a UNION needs both a ref to the key, and also to have children.
However, everything else in the server either has a ref or children.
Plus, we don't want KEY refs to be automatically followed.
As such, we define a new extension type EXT_KEY, and then make it
largely identical to EXT_REF
Alan T. DeKok [Thu, 14 Aug 2025 12:18:59 +0000 (08:18 -0400)]
don't print the attribute twice
and make the outout a bit easier to read
Alan T. DeKok [Wed, 13 Aug 2025 19:10:55 +0000 (15:10 -0400)]
add FR_TYPE_UNION
which is not used for anything
Alan T. DeKok [Wed, 13 Aug 2025 16:10:22 +0000 (12:10 -0400)]
remove many uses of Tmp-*
Alan T. DeKok [Wed, 13 Aug 2025 14:56:12 +0000 (10:56 -0400)]
notes on MEMBER of type 'struct' with 'clone=ref'
it works in some cases, but not others. Document why, so we can
remove other todo's from the list of v4 features
Nick Porter [Thu, 14 Aug 2025 14:15:04 +0000 (15:15 +0100)]
Add v3.2 dpsk xlat for calculating PMK from SSID and PSK
Using v4 naming convention
Nick Porter [Thu, 14 Aug 2025 11:54:42 +0000 (12:54 +0100)]
Correct debian sid release name
Nick Porter [Thu, 14 Aug 2025 11:52:19 +0000 (12:52 +0100)]
Update docs from raddb
Nick Porter [Thu, 14 Aug 2025 11:51:51 +0000 (12:51 +0100)]
Add rlm_dpsk to docs
Nick Porter [Thu, 14 Aug 2025 11:02:48 +0000 (12:02 +0100)]
Add sample rlm_dpsk config
Nick Porter [Thu, 14 Aug 2025 10:15:53 +0000 (11:15 +0100)]
Add rlm_dpsk to RHEL packaging
Nick Porter [Thu, 14 Aug 2025 07:48:45 +0000 (08:48 +0100)]
Add tests of rlm_dpsk auth
Nick Porter [Thu, 14 Aug 2025 07:47:44 +0000 (08:47 +0100)]
Port rlm_dpsk autz and auth from v3.2.x
Nick Porter [Thu, 14 Aug 2025 10:16:45 +0000 (11:16 +0100)]
Add alias to make FR DPSK attributes more friendly
Nick Porter [Thu, 14 Aug 2025 07:41:41 +0000 (08:41 +0100)]
Add internal attributes to support DPSK
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
Arran Cudbard-Bell [Wed, 13 Aug 2025 00:23:29 +0000 (18:23 -0600)]
Remove errant exdents
Arran Cudbard-Bell [Wed, 13 Aug 2025 00:18:07 +0000 (18:18 -0600)]
Typo
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
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.
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
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
Alan T. DeKok [Tue, 12 Aug 2025 16:52:49 +0000 (12:52 -0400)]
Revert "change "fips=no" to "-fips""
This reverts commit
4340edae652b086078e8000a91899c3c73bd4e2b .
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
Alan T. DeKok [Tue, 12 Aug 2025 11:06:31 +0000 (07:06 -0400)]
use macro for common name
Nick Porter [Mon, 11 Aug 2025 15:35:38 +0000 (16:35 +0100)]
Add Debian 13 to Docker / Crossbuild tests
Nick Porter [Mon, 11 Aug 2025 15:27:23 +0000 (16:27 +0100)]
Add Debian 13 to CI tests
Nick Porter [Mon, 11 Aug 2025 15:26:56 +0000 (16:26 +0100)]
Debian sid now report "forky"
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
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.
github-actions[bot] [Sun, 10 Aug 2025 04:46:47 +0000 (04:46 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv4.tar
github-actions[bot] [Sun, 10 Aug 2025 04:42:07 +0000 (04:42 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/util.tar
github-actions[bot] [Sun, 10 Aug 2025 04:41:13 +0000 (04:41 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/radius.tar
github-actions[bot] [Sun, 10 Aug 2025 04:40:25 +0000 (04:40 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tftp.tar
github-actions[bot] [Sun, 10 Aug 2025 04:40:16 +0000 (04:40 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dns.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:59 +0000 (04:39 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/bfd.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:49 +0000 (04:39 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/vmps.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:46 +0000 (04:39 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/tacacs.tar
github-actions[bot] [Sun, 10 Aug 2025 04:39:41 +0000 (04:39 +0000)]
Scheduled fuzzing: Update src/tests/fuzzer-corpus/dhcpv6.tar
Alan T. DeKok [Fri, 8 Aug 2025 14:08:05 +0000 (10:08 -0400)]
add more tests to check triggers
Nick Porter [Fri, 8 Aug 2025 11:02:08 +0000 (12:02 +0100)]
Use enum to determine where limited port connections are tracked
Nick Porter [Fri, 8 Aug 2025 11:00:33 +0000 (12:00 +0100)]
Allocate array of connection pointers for static home servers
Nick Porter [Fri, 8 Aug 2025 10:58:35 +0000 (11:58 +0100)]
Populate and use num_ports in 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
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
Nick Porter [Fri, 8 Aug 2025 09:39:39 +0000 (10:39 +0100)]
If the request has timed out request->timeout is cleared
Nick Porter [Fri, 8 Aug 2025 08:08:15 +0000 (09:08 +0100)]
Ensure limits are checked regardless of restricted source port range
Nick Porter [Fri, 8 Aug 2025 07:58:58 +0000 (08:58 +0100)]
Remove duplicate check
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.
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
Nick Porter [Thu, 7 Aug 2025 16:12:57 +0000 (17:12 +0100)]
Remove reference to files not in the packages
Alan T. DeKok [Thu, 7 Aug 2025 15:24:18 +0000 (11:24 -0400)]
catch pop on running trigger, with empty stack
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
Alan T. DeKok [Thu, 7 Aug 2025 14:58:53 +0000 (10:58 -0400)]
we don't need separate read / write BIOs
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.
Alan T. DeKok [Thu, 7 Aug 2025 14:16:09 +0000 (10:16 -0400)]
check corner cases
we can't starve threads of ports :(
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.
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
Nick Porter [Wed, 6 Aug 2025 14:54:01 +0000 (15:54 +0100)]
Use the thread source port range, rather than the instance
Nick Porter [Wed, 6 Aug 2025 14:53:13 +0000 (15:53 +0100)]
Split the restricted source port range per thread
Nick Porter [Wed, 6 Aug 2025 12:58:27 +0000 (13:58 +0100)]
We do use SO_REUSEPORT for some clients
Nick Porter [Thu, 7 Aug 2025 10:45:17 +0000 (11:45 +0100)]
Only unlink bio if it is in a chain
Nick Porter [Thu, 7 Aug 2025 11:31:20 +0000 (12:31 +0100)]
Correct bio chain re-link
Alan T. DeKok [Thu, 7 Aug 2025 11:03:04 +0000 (07:03 -0400)]
ptrs may be NULL
Alan T. DeKok [Thu, 7 Aug 2025 10:26:13 +0000 (06:26 -0400)]
at least one ptr has to be set
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
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
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.
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.
Alan T. DeKok [Wed, 6 Aug 2025 12:22:08 +0000 (08:22 -0400)]
hoist common checks to 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.
Alan T. DeKok [Wed, 6 Aug 2025 11:48:23 +0000 (07:48 -0400)]
use the correct sbuff macro.
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
Arran Cudbard-Bell [Tue, 5 Aug 2025 18:01:17 +0000 (12:01 -0600)]
WS
Arran Cudbard-Bell [Tue, 5 Aug 2025 18:00:55 +0000 (12:00 -0600)]
Add another Calix VSA we observed in the wild
Nick Porter [Tue, 5 Aug 2025 14:30:53 +0000 (15:30 +0100)]
Use better method for un-marshalling Perl values to pairs
Nick Porter [Tue, 5 Aug 2025 13:54:33 +0000 (14:54 +0100)]
No need to talloc a temporary box
Nick Porter [Tue, 5 Aug 2025 12:36:31 +0000 (13:36 +0100)]
Cast ruby string length to a consistent type
Nick Porter [Tue, 5 Aug 2025 11:30:19 +0000 (12:30 +0100)]
Add test using float value in mRuby