]>
git.ipfire.org Git - thirdparty/freeradius-server.git/log
Alan T. DeKok [Thu, 8 Oct 2020 19:55:25 +0000 (15:55 -0400)]
added test for malformed attributes
Alan T. DeKok [Thu, 8 Oct 2020 19:54:30 +0000 (15:54 -0400)]
malformed VSAs get decoded as raw attributes
Alan T. DeKok [Thu, 8 Oct 2020 19:52:32 +0000 (15:52 -0400)]
account for 4 bytes of PEN and 1 byte of length, too
Alan T. DeKok [Thu, 8 Oct 2020 19:47:47 +0000 (15:47 -0400)]
ASAN poison regions of the buffer which we're not using.
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:55:33 +0000 (13:55 -0500)]
Fix bad search/replace
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:54:13 +0000 (13:54 -0500)]
Add src/dst address swap function
Arran Cudbard-Bell [Thu, 8 Oct 2020 18:44:58 +0000 (13:44 -0500)]
Unify socket address structures
James Jones [Thu, 8 Oct 2020 15:45:21 +0000 (10:45 -0500)]
Restore amount to advance by to fr_dbuff_marker_advance() (#3682)
James Jones [Thu, 8 Oct 2020 15:04:53 +0000 (10:04 -0500)]
Convert selected "dbuff" operations to macros that take dbuff or marker (#3674)
Aside from fr_dbuff_current(), which will use the marker's current
position pointer when passed a marker, these will, when passed a
marker, retrieve the value from its associated dbuff.
We leave the current marker functions in place so code using them
can change at will rather than forcing a flag day.
Co-authored-by: Arran Cudbard-Bell <a.cudbardb@freeradius.org>
James Jones [Thu, 8 Oct 2020 14:57:45 +0000 (09:57 -0500)]
Add fr_dbuff_move() and tests (#3675)
Alan T. DeKok [Thu, 8 Oct 2020 14:24:43 +0000 (10:24 -0400)]
use correct API to get 'octets' data type
Alan T. DeKok [Thu, 8 Oct 2020 13:17:03 +0000 (09:17 -0400)]
malformed options are decoded as raw options, and don't return an error
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:30:51 +0000 (14:30 -0500)]
s/request->state/request->state_pairs/
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:29:38 +0000 (14:29 -0500)]
s/request->packet->vps/request->request_pairs/
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:14:47 +0000 (14:14 -0500)]
s/request->reply->vps/request->reply_list/g
Arran Cudbard-Bell [Wed, 7 Oct 2020 19:11:34 +0000 (14:11 -0500)]
s/request->control/request->control_pairs/g
Arran Cudbard-Bell [Wed, 7 Oct 2020 18:58:42 +0000 (13:58 -0500)]
Add macros for pair lists
Alan T. DeKok [Wed, 7 Oct 2020 17:52:47 +0000 (13:52 -0400)]
allow attribute references in subrequest
and update docs and tests
Alan T. DeKok [Wed, 7 Oct 2020 17:48:45 +0000 (13:48 -0400)]
regenerate from config
Alan T. DeKok [Wed, 7 Oct 2020 13:51:00 +0000 (09:51 -0400)]
check for overflow on each PEN + len + options
Alan T. DeKok [Wed, 7 Oct 2020 13:43:15 +0000 (09:43 -0400)]
decode ipv4addr as ipv4addr, not as ipv4prefix
Alan T. DeKok [Wed, 7 Oct 2020 13:36:51 +0000 (09:36 -0400)]
rename to DHCP-Network-Subnet
if it's data type "ipv4prefix", then the name should NOT be
DHCP-Network-IP-Address
Arran Cudbard-Bell [Wed, 7 Oct 2020 13:30:22 +0000 (08:30 -0500)]
Remove useless copy operation
Arran Cudbard-Bell [Wed, 7 Oct 2020 13:23:13 +0000 (08:23 -0500)]
Remove useless code in fr_dhcpv4_decode_proto
Jorge Pereira [Wed, 7 Oct 2020 01:26:18 +0000 (22:26 -0300)]
:gear: dhcpv4: Fix wrong memory context
It must be the received ctx instead of local allocation.
Jorge Pereira [Wed, 7 Oct 2020 01:25:18 +0000 (22:25 -0300)]
:gear: dhcpv4: Fix the data type value box
Jorge Pereira [Wed, 7 Oct 2020 02:40:27 +0000 (23:40 -0300)]
Ignore fuzzer crash files
Alan T. DeKok [Tue, 6 Oct 2020 13:43:52 +0000 (09:43 -0400)]
statically define Tacacs-State
Jorge Pereira [Tue, 6 Oct 2020 04:43:28 +0000 (01:43 -0300)]
Fix UBSAN in fr_value_box_cast()
Alan T. DeKok [Mon, 5 Oct 2020 21:42:46 +0000 (17:42 -0400)]
move run-time checks to compile-time checks
Alan T. DeKok [Mon, 5 Oct 2020 21:18:29 +0000 (17:18 -0400)]
return on error
Alan T. DeKok [Mon, 5 Oct 2020 21:16:29 +0000 (17:16 -0400)]
initialize the VPs list
Alan T. DeKok [Mon, 5 Oct 2020 18:06:37 +0000 (14:06 -0400)]
more tests for multiple VSAs
Alan T. DeKok [Mon, 5 Oct 2020 18:04:59 +0000 (14:04 -0400)]
typo
Alan T. DeKok [Mon, 5 Oct 2020 17:54:16 +0000 (13:54 -0400)]
add more vendors, and reformat
Alan T. DeKok [Mon, 5 Oct 2020 17:29:16 +0000 (13:29 -0400)]
encode multiple VSAs into option 25
Alan T. DeKok [Mon, 5 Oct 2020 17:09:34 +0000 (13:09 -0400)]
remove unnecessary comment
Alan T. DeKok [Mon, 5 Oct 2020 17:06:06 +0000 (13:06 -0400)]
add tests. and decode multiple VSAs in option 125
Alan T. DeKok [Mon, 5 Oct 2020 17:02:59 +0000 (13:02 -0400)]
skip all of the VSA, even if we didn't read it all
Alan T. DeKok [Mon, 5 Oct 2020 15:40:25 +0000 (11:40 -0400)]
Allow vendor-specific options in DHCPv4
Alan T. DeKok [Mon, 5 Oct 2020 15:02:50 +0000 (11:02 -0400)]
make error message more descriptive
Alan T. DeKok [Mon, 5 Oct 2020 12:56:28 +0000 (08:56 -0400)]
'Attr-' is supported
Alan T. DeKok [Mon, 5 Oct 2020 00:19:38 +0000 (20:19 -0400)]
remove duplicate "inner-tunnel" virtual server
the methods which need it should provide it. The methods which
don't need it shouldn't miss it.
Alan T. DeKok [Mon, 5 Oct 2020 00:19:22 +0000 (20:19 -0400)]
output goes to log file, not %.ok
Alan T. DeKok [Sun, 4 Oct 2020 21:39:14 +0000 (17:39 -0400)]
escape _our_ use of {}
Alan T. DeKok [Sun, 4 Oct 2020 21:29:34 +0000 (17:29 -0400)]
add fr_dhcpv6_reply_initialize()
which recurses to create the nested structs / groups necessary
for nested replies. This way we always know that the nested
packets in the request contain nested replies.
Alan T. DeKok [Sun, 4 Oct 2020 21:28:55 +0000 (17:28 -0400)]
count the number of tests, too
Alan T. DeKok [Sun, 4 Oct 2020 20:48:27 +0000 (16:48 -0400)]
remove unused variable
Alan T. DeKok [Sun, 4 Oct 2020 20:24:20 +0000 (16:24 -0400)]
quiet scanner
Alan T. DeKok [Sun, 4 Oct 2020 20:21:53 +0000 (16:21 -0400)]
don't check if values are valid attribute names
The VALUE parser in the dictionaries just strdup's the name.
So we shouldn't have more stringent checks here.
Embedded zeros, etc. should be taken care of by passing an
explicit length to fr_dict_enum_by_name()
Alan T. DeKok [Sun, 4 Oct 2020 16:25:51 +0000 (12:25 -0400)]
it helps to advance the buffer
the tests still fail because of issues with fr_value_box_from_str()
noted in the previous commit.
Alan T. DeKok [Sun, 4 Oct 2020 14:54:38 +0000 (10:54 -0400)]
start of encoding Relay-Message
The tests for encoding relay packets don't yet work, for a few
reasons.
* fr_value_box_from_str() is passed dst_enumv, and it then
checks if the value is a valid _attribute_ name? Which
doesn't work for IPv6 addresses, as they contain ":"
* the fr_pair_list_afrom_substr() function doesn't treat
"Attr-" as special, so it tries to look it up in the various
dictionaries, and fails.
* the fr_dhcpv6_encode() function is failing for nested packets,
and doesn't return a useful error message
Alan T. DeKok [Sun, 4 Oct 2020 14:46:33 +0000 (10:46 -0400)]
check for end _before_ dereferencing pointers
Alan T. DeKok [Sun, 4 Oct 2020 14:29:27 +0000 (10:29 -0400)]
set a descriptive error if the packet is not OK
Alan T. DeKok [Sun, 4 Oct 2020 14:11:39 +0000 (10:11 -0400)]
parse nested groups
Alan T. DeKok [Sun, 4 Oct 2020 00:41:23 +0000 (20:41 -0400)]
remove erroneous assert
now that we have duplicate detection, the assert is not needed
Arran Cudbard-Bell [Sat, 3 Oct 2020 16:48:21 +0000 (11:48 -0500)]
get16 already looked at an offset of p + 2. It's less confusing to use two macros
Alan T. DeKok [Sat, 3 Oct 2020 15:52:39 +0000 (11:52 -0400)]
don't run packet_expiry_timer twice
Alan T. DeKok [Sat, 3 Oct 2020 15:39:04 +0000 (11:39 -0400)]
don't use "agent." prefix
now that we have full OIDs for names
Alan T. DeKok [Sat, 3 Oct 2020 15:37:30 +0000 (11:37 -0400)]
relay packets may be nested to almost any depth
Arran Cudbard-Bell [Sat, 3 Oct 2020 14:55:50 +0000 (09:55 -0500)]
Englishify
Arran Cudbard-Bell [Sat, 3 Oct 2020 14:33:12 +0000 (09:33 -0500)]
Remove two uses of tmpl_preparse
Arran Cudbard-Bell [Fri, 2 Oct 2020 20:49:03 +0000 (15:49 -0500)]
Minor tweaks
Alan T. DeKok [Sat, 3 Oct 2020 12:49:41 +0000 (08:49 -0400)]
remove unused assignment
Alan T. DeKok [Sat, 3 Oct 2020 12:30:30 +0000 (08:30 -0400)]
forbid smashing flags.
once a flag is set, it shouldn't be overwritten
Alan T. DeKok [Sat, 3 Oct 2020 01:23:02 +0000 (21:23 -0400)]
remove FR_TYPE_EXTENDED
it's now just a TLV with magic flags, and only for RADIUS
Alan T. DeKok [Sat, 3 Oct 2020 01:16:43 +0000 (21:16 -0400)]
remove FR_TYPE_EXTENDED from the RADIUS dictionaries and code
change it instead to data type "tlv", with flag "extended"
Alan T. DeKok [Sat, 3 Oct 2020 00:47:18 +0000 (20:47 -0400)]
remove duplicate names in dictionary flags
Alan T. DeKok [Fri, 2 Oct 2020 20:19:51 +0000 (16:19 -0400)]
clean up and recursively verify Relay-Message
fix fr_dhcpv6_option_find() to check lengths
and verify to/from client now checks inside of Relay-Message
for the various packet requirements
Arran Cudbard-Bell [Fri, 2 Oct 2020 20:16:14 +0000 (15:16 -0500)]
Unknown parents shouldn't have any children
Alan T. DeKok [Fri, 2 Oct 2020 20:01:09 +0000 (16:01 -0400)]
only one error per unit test
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:47:04 +0000 (14:47 -0500)]
Better errors
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:45:25 +0000 (14:45 -0500)]
Fixup tests for non vendor definitions
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:28:04 +0000 (14:28 -0500)]
Typo
Arran Cudbard-Bell [Fri, 2 Oct 2020 19:26:29 +0000 (14:26 -0500)]
Add Nokia SR DHCPv6 options
Alan T. DeKok [Fri, 2 Oct 2020 18:52:07 +0000 (14:52 -0400)]
<sigh>
Alan T. DeKok [Fri, 2 Oct 2020 18:49:50 +0000 (14:49 -0400)]
skip option header, too
Alan T. DeKok [Fri, 2 Oct 2020 18:48:09 +0000 (14:48 -0400)]
decode relay options, not relay header
Alan T. DeKok [Fri, 2 Oct 2020 18:43:28 +0000 (14:43 -0400)]
fix the tests for new decoder and updated dictionaries
Alan T. DeKok [Fri, 2 Oct 2020 18:23:22 +0000 (14:23 -0400)]
clarify error
Alan T. DeKok [Fri, 2 Oct 2020 18:19:46 +0000 (14:19 -0400)]
decode it as a struct
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:25:21 +0000 (13:25 -0500)]
Parent unknowns correctly
Alan T. DeKok [Fri, 2 Oct 2020 18:10:31 +0000 (14:10 -0400)]
mark attributes as type 'group'
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:08:01 +0000 (13:08 -0500)]
insert the relay-message into the output list
Arran Cudbard-Bell [Fri, 2 Oct 2020 18:05:44 +0000 (13:05 -0500)]
Print the child name when decoding structs
Alan T. DeKok [Fri, 2 Oct 2020 17:59:04 +0000 (13:59 -0400)]
pass the correct length to value_box_from_network
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:41 +0000 (12:49 -0500)]
Add failing test for relayed packets
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:27 +0000 (12:49 -0500)]
Expose loaded attributes to encoder/decoder
Arran Cudbard-Bell [Fri, 2 Oct 2020 17:49:11 +0000 (12:49 -0500)]
Decode relay message options
Alan T. DeKok [Fri, 2 Oct 2020 17:52:50 +0000 (13:52 -0400)]
typos.
slower is faster :(
Alan T. DeKok [Fri, 2 Oct 2020 17:49:42 +0000 (13:49 -0400)]
fix return code from fr_dhcpv6_ok_internal()
Alan T. DeKok [Fri, 2 Oct 2020 17:39:07 +0000 (13:39 -0400)]
check max_attributes for nested Relay-Messages
Alan T. DeKok [Fri, 2 Oct 2020 17:31:35 +0000 (13:31 -0400)]
RFC 8415 Section 19.3 allows for nested Relay-Messages
Alan T. DeKok [Fri, 2 Oct 2020 17:24:50 +0000 (13:24 -0400)]
don't allow Relay-Message in normal packets
Alan T. DeKok [Fri, 2 Oct 2020 16:40:09 +0000 (12:40 -0400)]
recurse to check contents of Relay-Message
Alan T. DeKok [Fri, 2 Oct 2020 16:18:57 +0000 (12:18 -0400)]
forbid duplicate virtual servers
Alan T. DeKok [Fri, 2 Oct 2020 15:54:37 +0000 (11:54 -0400)]
fix fr_dhcpv6_ok() for relay message
Alan T. DeKok [Fri, 2 Oct 2020 15:46:16 +0000 (11:46 -0400)]
add cleanup_delay to dhcpv4, dhcpv6, and ensure it's >0
Arran Cudbard-Bell [Fri, 2 Oct 2020 15:39:33 +0000 (10:39 -0500)]
Pass up the failure if onload fails
Arran Cudbard-Bell [Fri, 2 Oct 2020 15:38:04 +0000 (10:38 -0500)]
Fix relay message type