]> git.ipfire.org Git - thirdparty/freeradius-server.git/log
thirdparty/freeradius-server.git
17 months agoremove is_pair
Alan T. DeKok [Thu, 20 Feb 2025 16:13:15 +0000 (11:13 -0500)] 
remove is_pair

now that we have sequence_of=oid_and_value

17 months agomove run-time check to load check
Alan T. DeKok [Thu, 20 Feb 2025 14:10:26 +0000 (09:10 -0500)] 
move run-time check to load check

17 months agoadd copyright and license
Alan T. DeKok [Thu, 20 Feb 2025 14:03:44 +0000 (09:03 -0500)] 
add copyright and license

17 months agoallow sequence_of=oid_and_value
Alan T. DeKok [Thu, 20 Feb 2025 01:24:31 +0000 (20:24 -0500)] 
allow sequence_of=oid_and_value

and set_of=oid_and_value

which is a bit clear than 'is_pair'

17 months agoprotocol files depend on the test dictionaries, too
Alan T. DeKok [Thu, 20 Feb 2025 00:47:25 +0000 (19:47 -0500)] 
protocol files depend on the test dictionaries, too

17 months agohoist more things during xlat_purify
Alan T. DeKok [Wed, 19 Feb 2025 21:15:22 +0000 (16:15 -0500)] 
hoist more things during xlat_purify

17 months agoadd note about future improvements
Alan T. DeKok [Wed, 19 Feb 2025 20:11:55 +0000 (15:11 -0500)] 
add note about future improvements

17 months agodo a better job of purifying xlats
Alan T. DeKok [Wed, 19 Feb 2025 19:09:23 +0000 (14:09 -0500)] 
do a better job of purifying xlats

set the can_purify flag in more places, add tests, and do
associated cleanups

17 months agoremove is_pairs and other cleanup
Alan T. DeKok [Wed, 19 Feb 2025 18:31:34 +0000 (13:31 -0500)] 
remove is_pairs and other cleanup

Also, cut some variables which weren't being used when sorting
set items (reducing code).

Fixed a test case which should not have failed, and changed it
to test an actual failing case.

17 months agoadd migration flag which helps us get rid of "&"
Alan T. DeKok [Wed, 19 Feb 2025 16:09:40 +0000 (11:09 -0500)] 
add migration flag which helps us get rid of "&"

if the flag is set, and the server is passed -C, it will complain
when the callenv config / etc. uses "&"

17 months agoCALL_ENV_FLAG_ATTRIBUTE also means concat
Alan T. DeKok [Tue, 18 Feb 2025 19:57:05 +0000 (14:57 -0500)] 
CALL_ENV_FLAG_ATTRIBUTE also means concat

because we don't parsr multiple _different_ attributes from one
expansion

17 months agoremove more "&"
Alan T. DeKok [Tue, 18 Feb 2025 19:52:18 +0000 (14:52 -0500)] 
remove more "&"

17 months agoremove more '&'
Alan T. DeKok [Tue, 18 Feb 2025 19:36:54 +0000 (14:36 -0500)] 
remove more '&'

17 months agoremove '&'
Alan T. DeKok [Tue, 18 Feb 2025 19:33:22 +0000 (14:33 -0500)] 
remove '&'

17 months agoremove '&'
Alan T. DeKok [Tue, 18 Feb 2025 19:29:46 +0000 (14:29 -0500)] 
remove '&'

17 months agoquiet coverity. CID #1642987
Alan T. DeKok [Tue, 18 Feb 2025 00:29:26 +0000 (19:29 -0500)] 
quiet coverity.   CID #1642987

17 months agofurther limit OID encoding
Alan T. DeKok [Mon, 17 Feb 2025 23:53:22 +0000 (18:53 -0500)] 
further limit OID encoding

due to rules of first 2 fields are (x*40) + y, if the first
component is 0 or 1, then the second component has to be 0..39

If the first component is 2, then the second component can be
anything.

17 months agoclean up decode OID.
Alan T. DeKok [Mon, 17 Feb 2025 18:28:57 +0000 (13:28 -0500)] 
clean up decode OID.

17 months agoRemove & from policy files
Nick Porter [Mon, 17 Feb 2025 17:53:09 +0000 (17:53 +0000)] 
Remove & from policy files

17 months agosimplify encode OID and catch parse errors
Alan T. DeKok [Mon, 17 Feb 2025 17:11:27 +0000 (12:11 -0500)] 
simplify encode OID and catch parse errors

so that when the OID string is not an OID string, it fails
rather than encoding "something"

17 months agomove the basic type encoding to its own file
Alan T. DeKok [Mon, 17 Feb 2025 16:52:06 +0000 (11:52 -0500)] 
move the basic type encoding to its own file

so that we test encoding of all of the data types before we
start testing more complex things.

Add "count" to all of the inputs, too

17 months agouse DER names in dictionaries
Alan T. DeKok [Mon, 17 Feb 2025 13:11:51 +0000 (08:11 -0500)] 
use DER names in dictionaries

and forbid more FreeRADIUS types earlier in the parsing process,
with better error messages.

17 months agoconvert to more standard DER names
Alan T. DeKok [Mon, 17 Feb 2025 12:56:01 +0000 (07:56 -0500)] 
convert to more standard DER names

17 months agouse more descriptive error messages
Alan T. DeKok [Mon, 17 Feb 2025 12:52:46 +0000 (07:52 -0500)] 
use more descriptive error messages

17 months agoadd comments
Alan T. DeKok [Mon, 17 Feb 2025 12:33:10 +0000 (07:33 -0500)] 
add comments

17 months agodo load-time checks, not run-time checks
Alan T. DeKok [Mon, 17 Feb 2025 12:30:49 +0000 (07:30 -0500)] 
do load-time checks, not run-time checks

if the run-time code assumes that "is_pair" is only for type
group, then enforce that when we load the dictionaries.

17 months agorearrange to make name and parent available to validation routines
Alan T. DeKok [Mon, 17 Feb 2025 12:27:08 +0000 (07:27 -0500)] 
rearrange to make name and parent available to validation routines

so that the type / flag validation routines have more information
with which to make their decisions.

17 months agoremove 'option=' where it can be determined automatically
Alan T. DeKok [Mon, 17 Feb 2025 02:25:20 +0000 (21:25 -0500)] 
remove 'option=' where it can be determined automatically

17 months agoset the attribute number before checking the type and flags
Alan T. DeKok [Mon, 17 Feb 2025 02:22:02 +0000 (21:22 -0500)] 
set the attribute number before checking the type and flags

so that the validation functions can double-check the attribute
number.

17 months agoupdate error messages with more information
Alan T. DeKok [Mon, 17 Feb 2025 02:21:42 +0000 (21:21 -0500)] 
update error messages with more information

17 months agolet's use lowercase names for consistency
Alan T. DeKok [Mon, 17 Feb 2025 02:16:48 +0000 (21:16 -0500)] 
let's use lowercase names for consistency

17 months agotry to allow just 'option'
Alan T. DeKok [Mon, 17 Feb 2025 00:15:48 +0000 (19:15 -0500)] 
try to allow just 'option'

In many cases, DER defines something like

ATTRIBUTE foo 1 type option=1

this seems redundant.

We make provisions for allowing just 'option', which could then
take the option number from the attribute number.

However, the function dict_read_process_attribute() initializes
the attribute number _after_ processing the flags / type field.

Once that code has been tweaked to parse the attribute number
first, this new DER code will work.  At that point, the DER
dictionaries can be updated with the following Perl script:

perl -p -i -e 'next if !/^ATTR/;s/option=\d+/option/' share/dictionary/der/dictionary*

17 months agobatten down the hatches a little more.
Alan T. DeKok [Sun, 16 Feb 2025 23:18:10 +0000 (18:18 -0500)] 
batten down the hatches a little more.

things which need values should really take the values

17 months agoremove 'tagnum=' for flags.
Alan T. DeKok [Sun, 16 Feb 2025 22:39:20 +0000 (17:39 -0500)] 
remove 'tagnum=' for flags.

it was being used as a synonym for 'option=', and was therefore
not needed.

also remove 'class=', though it's just commented out.
The only uses of it were at the same time as setting 'option=',
and the option parser already sets the class

17 months agolimit 'der_type=foo' to compatible FreeRADIUS data types.
Alan T. DeKok [Sun, 16 Feb 2025 22:01:03 +0000 (17:01 -0500)] 
limit 'der_type=foo' to compatible FreeRADIUS data types.

Except for serialNumber, which is der_type=integer, and FreeRADIUS
type 'octets'.  That's because the serial numbers are larger than
64 bits, and we really don't need to see them as decimal values.

Update the decoder to allow this case.  The encoder already
allowed it, so we update the encoder with a comment explaining
why it's allowed.

17 months agomore cross-checks and error messages
Alan T. DeKok [Sun, 16 Feb 2025 21:35:21 +0000 (16:35 -0500)] 
more cross-checks and error messages

17 months agouse consistent uint64_t for max
Alan T. DeKok [Sun, 16 Feb 2025 21:29:48 +0000 (16:29 -0500)] 
use consistent uint64_t for max

17 months agodon't use uint64_t for 8-bit tags
Alan T. DeKok [Sun, 16 Feb 2025 21:15:49 +0000 (16:15 -0500)] 
don't use uint64_t for 8-bit tags

which also cleans up a lot of uses of PRIu64

17 months agomore UINT8_MAX cleanups
Alan T. DeKok [Sun, 16 Feb 2025 21:03:33 +0000 (16:03 -0500)] 
more UINT8_MAX cleanups

17 months agolower FR_DER_TAG_MAX
Alan T. DeKok [Sun, 16 Feb 2025 20:54:53 +0000 (15:54 -0500)] 
lower FR_DER_TAG_MAX

there's no reason to make it UINT8_MAX, as we only support a
small number of tags.

Also update the arrays to use

array[FR_DER_TAG_MAX] = { ... }

instead of

array[] = { ..., [TAG_MAX] = false }

17 months agobe more stringent on allowed values
Alan T. DeKok [Sun, 16 Feb 2025 20:54:09 +0000 (15:54 -0500)] 
be more stringent on allowed values

don't check just the first character.

Only allow tag values which we can encode and decode

17 months agoperhaps save a bit of space using single bits for booleans
Alan T. DeKok [Sun, 16 Feb 2025 20:33:07 +0000 (15:33 -0500)] 
perhaps save a bit of space using single bits for booleans

17 months agominor cleanups
Alan T. DeKok [Sun, 16 Feb 2025 20:27:37 +0000 (15:27 -0500)] 
minor cleanups

17 months agono need to say it's a tag "num".
Alan T. DeKok [Sun, 16 Feb 2025 20:10:25 +0000 (15:10 -0500)] 
no need to say it's a tag "num".

it's an enum, and that's good enough

17 months agoremove unused array
Alan T. DeKok [Sun, 16 Feb 2025 20:07:59 +0000 (15:07 -0500)] 
remove unused array

and make other array static

17 months agowe know this can never fail
Alan T. DeKok [Sat, 15 Feb 2025 20:57:23 +0000 (15:57 -0500)] 
we know this can never fail

17 months agorework encode_len() to be even simpler
Alan T. DeKok [Sat, 15 Feb 2025 15:15:41 +0000 (10:15 -0500)] 
rework encode_len() to be even simpler

and add comments which explain the functionality

17 months agocheck return. CID #1642925
Alan T. DeKok [Sat, 15 Feb 2025 13:56:55 +0000 (08:56 -0500)] 
check return.  CID #1642925

17 months agoquiet analyzer. CID #1642927
Alan T. DeKok [Sat, 15 Feb 2025 13:42:10 +0000 (08:42 -0500)] 
quiet analyzer.  CID #1642927

the buffer is always big enough.

17 months agorefactor encode_len. Outcome of CID #1642928
Alan T. DeKok [Sat, 15 Feb 2025 13:39:39 +0000 (08:39 -0500)] 
refactor encode_len.  Outcome of CID #1642928

the encode_len() function doesn't need to be passed a data length,
that information is already in the dbuff.

Refactor and rearrange the code.

17 months agolen can be zero. CID #1642930
Alan T. DeKok [Sat, 15 Feb 2025 13:39:22 +0000 (08:39 -0500)] 
len can be zero.  CID #1642930

17 months agouse FUNCTION_RETURN() rather than function() CID #1642929
Alan T. DeKok [Fri, 14 Feb 2025 21:48:12 +0000 (16:48 -0500)] 
use FUNCTION_RETURN() rather than function() CID #1642929

17 months agouse DER types, now that we can use the DER names
Alan T. DeKok [Fri, 14 Feb 2025 19:35:22 +0000 (14:35 -0500)] 
use DER types, now that we can use the DER names

17 months agoallow protocol-specific data types to over-ride standard ones
Alan T. DeKok [Fri, 14 Feb 2025 19:29:14 +0000 (14:29 -0500)] 
allow protocol-specific data types to over-ride standard ones

17 months agomake ubsan happy by removing duplication
Alan T. DeKok [Fri, 14 Feb 2025 14:02:59 +0000 (09:02 -0500)] 
make ubsan happy by removing duplication

17 months agofix ubsan warning about shifting signed numbers
Alan T. DeKok [Fri, 14 Feb 2025 13:10:58 +0000 (08:10 -0500)] 
fix ubsan warning about shifting signed numbers

17 months agoarrays don't go in header files
Alan T. DeKok [Thu, 13 Feb 2025 21:55:27 +0000 (16:55 -0500)] 
arrays don't go in header files

17 months agouse "der_type" and not "subtype"
Alan T. DeKok [Thu, 13 Feb 2025 21:53:38 +0000 (16:53 -0500)] 
use "der_type" and not "subtype"

along with some associated cleanups

17 months agoadd fuzzer for DER
Alan T. DeKok [Thu, 13 Feb 2025 21:16:59 +0000 (16:16 -0500)] 
add fuzzer for DER

17 months agoadded unit tests for DER
Ethan Thompson [Thu, 13 Feb 2025 20:56:28 +0000 (15:56 -0500)] 
added unit tests for DER

17 months agofeat: Wrote DER decoder
ethan-thompson [Wed, 12 Feb 2025 18:35:22 +0000 (13:35 -0500)] 
feat: Wrote DER decoder

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
17 months agoenforce only int64 integers.
Alan T. DeKok [Thu, 13 Feb 2025 18:45:32 +0000 (13:45 -0500)] 
enforce only int64 integers.

that's all the decoder/encoder can handle right now

17 months agoAdd DER encoder
Ethan Thompson [Thu, 13 Feb 2025 17:48:15 +0000 (12:48 -0500)] 
Add DER encoder

17 months agofeat: Wrote dictionaries for DER related things (certificates and CSR's)
ethan-thompson [Wed, 12 Feb 2025 18:36:08 +0000 (13:36 -0500)] 
feat: Wrote dictionaries for DER related things (certificates and CSR's)

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
17 months agofeat: DER dictionary parser and validator
ethan-thompson [Wed, 12 Feb 2025 18:34:59 +0000 (13:34 -0500)] 
feat: DER dictionary parser and validator

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
17 months agochore: Added DER to the list of fuzzer binary folders to ignore.
ethan-thompson [Wed, 12 Feb 2025 18:34:33 +0000 (13:34 -0500)] 
chore: Added DER to the list of fuzzer binary folders to ignore.

Signed-off-by: ethan-thompson <ethan.thompson@networkradius.com>
17 months agoSimplify ldap.authenticate
Nick Porter [Thu, 13 Feb 2025 13:54:08 +0000 (13:54 +0000)] 
Simplify ldap.authenticate

The module now expects the DN to be found / populated prior to calling
ldap.authenticate.

This is consistent with other authentication methods which expect all
the data to be in the correct place before attempting authenticaiton.

17 months agoNot all calls to fr_tls_call_push require the session cache
Nick Porter [Thu, 13 Feb 2025 12:14:26 +0000 (12:14 +0000)] 
Not all calls to fr_tls_call_push require the session cache

17 months agoAdd more VSAs. Fixes #5511
Alan T. DeKok [Thu, 13 Feb 2025 12:16:20 +0000 (07:16 -0500)] 
Add more VSAs.  Fixes #5511

17 months agoScheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar
github-actions[bot] [Thu, 13 Feb 2025 09:34:59 +0000 (09:34 +0000)] 
Scheduled fuzzing: Update src/tests/fuzzer-corpus/cbor.tar

17 months agoignore auto-generated fuzzer_*.c files, too
Alan T. DeKok [Wed, 12 Feb 2025 20:16:28 +0000 (15:16 -0500)] 
ignore auto-generated fuzzer_*.c files, too

17 months agoremove pdf output
Alan T. DeKok [Wed, 12 Feb 2025 20:13:37 +0000 (15:13 -0500)] 
remove pdf output

it hasn't worked for a long time.  If we need PDFs, then we should
use an Antora to PDF plugin

17 months agoremove HTML output.
Alan T. DeKok [Wed, 12 Feb 2025 20:10:46 +0000 (15:10 -0500)] 
remove HTML output.

it was there temporarily before we moved to Antora.  Now that
antora works, the HTML can be deleted.

17 months agoremove references to doc/raddb
Alan T. DeKok [Wed, 12 Feb 2025 20:01:23 +0000 (15:01 -0500)] 
remove references to doc/raddb

17 months agoregenerate
Alan T. DeKok [Wed, 12 Feb 2025 20:00:56 +0000 (15:00 -0500)] 
regenerate

17 months agoregenerate
Alan T. DeKok [Wed, 12 Feb 2025 20:00:32 +0000 (15:00 -0500)] 
regenerate

17 months agoci: bump crossbuild up from ubuntu 20.04
Matthew Newton [Wed, 12 Feb 2025 19:39:20 +0000 (19:39 +0000)] 
ci: bump crossbuild up from ubuntu 20.04

17 months agoci: bump action version
Matthew Newton [Wed, 12 Feb 2025 19:38:38 +0000 (19:38 +0000)] 
ci: bump action version

17 months agoci: couple more fixes to docker-refresh job
Matthew Newton [Wed, 12 Feb 2025 19:15:38 +0000 (19:15 +0000)] 
ci: couple more fixes to docker-refresh job

17 months agoci: give docker refresh job ability to handle more than one os
Matthew Newton [Wed, 12 Feb 2025 18:42:41 +0000 (18:42 +0000)] 
ci: give docker refresh job ability to handle more than one os

17 months agoadd home_server_lifetime, and update docs
Alan T. DeKok [Wed, 12 Feb 2025 15:58:50 +0000 (10:58 -0500)] 
add home_server_lifetime, and update docs

17 months agowarn if the secret changes
Alan T. DeKok [Wed, 12 Feb 2025 15:45:24 +0000 (10:45 -0500)] 
warn if the secret changes

17 months agoMinor fixup to source port hunt & peck
Nick Porter [Wed, 12 Feb 2025 15:04:55 +0000 (15:04 +0000)] 
Minor fixup to source port hunt & peck

17 months agohunt and peck for an open source port
Alan T. DeKok [Wed, 12 Feb 2025 13:08:13 +0000 (08:08 -0500)] 
hunt and peck for an open source port

17 months agoonly the replication modes allow for a single source socket
Alan T. DeKok [Wed, 12 Feb 2025 13:02:10 +0000 (08:02 -0500)] 
only the replication modes allow for a single source socket

so XLAT_PROXY uses the normal code path

17 months agomove src_port_start and src_port_end to FD BIO
Alan T. DeKok [Wed, 12 Feb 2025 12:29:53 +0000 (07:29 -0500)] 
move src_port_start and src_port_end to FD BIO

so that other applications can use them too

17 months agothese files shouldn't be here
Alan T. DeKok [Tue, 11 Feb 2025 21:59:43 +0000 (16:59 -0500)] 
these files shouldn't be here

or are no longer needed

17 months agolet's comment these out by default
Alan T. DeKok [Tue, 11 Feb 2025 20:06:52 +0000 (15:06 -0500)] 
let's comment these out by default

17 months agoadd and document src_port_start and src_port_end
Alan T. DeKok [Tue, 11 Feb 2025 19:01:10 +0000 (14:01 -0500)] 
add and document src_port_start and src_port_end

which currently only work for mode=dynamic-proxy

17 months agoadd reuseport config, and use common function
Alan T. DeKok [Tue, 11 Feb 2025 15:54:15 +0000 (10:54 -0500)] 
add reuseport config, and use common function

17 months agonotes on "connected" UDP sockets
Alan T. DeKok [Tue, 11 Feb 2025 16:57:28 +0000 (11:57 -0500)] 
notes on "connected" UDP sockets

17 months agoAdd extension parsing to LDAP map URIs
Nick Porter [Tue, 11 Feb 2025 18:22:27 +0000 (18:22 +0000)] 
Add extension parsing to LDAP map URIs

17 months agoAdd freeradiusClientRegion to LDAP schema
Nick Porter [Tue, 11 Feb 2025 18:07:55 +0000 (18:07 +0000)] 
Add freeradiusClientRegion to LDAP schema

17 months agoAdd LDAP xlat test using server side extensions
Nick Porter [Tue, 11 Feb 2025 11:12:59 +0000 (11:12 +0000)] 
Add LDAP xlat test using server side extensions

17 months agoAdd check_attribute to sample ldap module config
Nick Porter [Tue, 11 Feb 2025 11:03:24 +0000 (11:03 +0000)] 
Add check_attribute to sample ldap module config

17 months agoAdd ORDERING to freeradiusClientIdentifier
Nick Porter [Tue, 11 Feb 2025 10:59:34 +0000 (10:59 +0000)] 
Add ORDERING to freeradiusClientIdentifier

To allow for server side sorting

17 months agoInvalid IP address family is an error
Nick Porter [Tue, 11 Feb 2025 10:58:21 +0000 (10:58 +0000)] 
Invalid IP address family is an error

17 months agoDefine DO_NOT_RESPOND code for tls
Nick Porter [Tue, 11 Feb 2025 08:59:00 +0000 (08:59 +0000)] 
Define DO_NOT_RESPOND code for tls

Allows use of `handled` in verify certificate policies

17 months agoupdate counters when nuking the pending list
Alan T. DeKok [Mon, 10 Feb 2025 20:28:37 +0000 (15:28 -0500)] 
update counters when nuking the pending list

17 months agoreset the counter when there are no pending clients
Alan T. DeKok [Mon, 10 Feb 2025 20:08:38 +0000 (15:08 -0500)] 
reset the counter when there are no pending clients