freebsd-skq/sys
John Baldwin d2e076c37b ossl: Don't encryt/decrypt too much data for chacha20.
The loops for Chacha20 and Chacha20+Poly1305 which encrypted/decrypted
full blocks of data used the minimum of the input and output segment
lengths to determine the size of the next chunk ('todo') to pass to
Chacha20_ctr32().  However, the input and output segments could extend
past the end of the ciphertext region into the tag (e.g.  if a "plain"
single mbuf contained an entire TLS record).  If the length of the tag
plus the length of the last partial block together were at least as
large as a full Chacha20 block (64 bytes), then an extra block was
encrypted/decrypted overlapping with the tag.  Fix this by also
capping the amount of data to encrypt/decrypt by the amount of
remaining data in the ciphertext region ('resid').

Reported by:	gallatin
Reviewed by:	cem, gallatin, markj
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D29517
2021-04-01 15:49:07 -07:00
..
amd64 AMD-vi: Mixed format IVHD block should replace fixed format IVHD block 2021-04-01 15:31:24 +08:00
arm arm: add options GDB to std.armv6 and std.armv7 2021-03-30 12:04:24 -03:00
arm64 gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
bsm
cam cam: make sure to clear CCBs allocated on the stack 2021-03-30 19:15:43 +01:00
cddl Teach DTrace that unaligned accesses are OK on aarch64, not just x86. 2021-03-22 23:57:19 +00:00
compat LinuxKPI/OFED: (re)move inetdevice.h implementation 2021-03-30 14:40:46 +00:00
conf gdb: allow setting/removing hardware watchpoints 2021-03-30 11:36:41 -03:00
contrib zfs: Cherry-pick upstream commit ef977fce6636 to fix macOS/arm64 bootstrap 2021-03-27 02:23:59 +00:00
crypto ossl: Don't encryt/decrypt too much data for chacha20. 2021-04-01 15:49:07 -07:00
ddb ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
dev cxgbe(4): Always use the per-VI callout to read interface stats. 2021-04-01 14:24:29 -07:00
dts dts: Bump the freebsd branding version to 5.10 2021-03-23 15:02:21 +01:00
fs nfsv4 client: factor loop contents out into a separate function 2021-04-01 15:36:37 -07:00
gdb gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
geom gmirror: Pre-allocate the timeout event structure 2021-03-11 15:45:15 -05:00
gnu Remove the old dts imported tree. 2021-01-15 20:09:55 +01:00
i386 x86: clear %db registers in new process 2021-03-31 02:07:35 +03:00
isa Move back the isa non-PNP driver deadline to FreeBSD 14. 2021-03-08 16:00:23 -07:00
kern Export sbuf_drain to orchestrate lock and drain action 2021-03-31 19:17:37 +02:00
kgssapi opencrypto: Introduce crypto_dispatch_async() 2021-02-08 09:19:19 -05:00
libkern random(9): Restore historical [0,2^31-1] output range and related man 2021-03-24 16:14:58 +11:00
mips Clean up a couple of MD warts in vm_fault_populate(): 2021-03-30 18:15:55 -07:00
modules ndis: remove leftover sys/modules/ndis 2021-03-25 14:31:00 -04:00
net vxlan: correct interface MTU when using hw offloads 2021-03-31 14:38:26 +03:00
net80211 net80211: prefix get_random_bytes() with net80211_ 2021-03-24 22:16:09 +00:00
netgraph netgraph/ng_bridge: Add counters for the first link, too 2021-02-10 19:05:37 +01:00
netinet tcp: Shouldn't drain empty sbuf 2021-04-01 17:18:38 +02:00
netinet6 base: remove if_wg(4) and associated utilities, manpage 2021-03-17 09:14:48 -05:00
netipsec Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors." 2021-02-08 22:32:32 +00:00
netpfil pf: remove obsolete reference to ndis(4) in a comment 2021-03-25 14:44:30 -04:00
netsmb
nfs Fix panic when using BOOTP to resolve root path. 2021-03-28 14:02:40 -05:00
nfsclient nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nfsserver nfs: Cleanup dead files 2021-03-17 06:16:31 +11:00
nlm
ofed LinuxKPI/OFED: (re)move inetdevice.h implementation 2021-03-30 14:40:46 +00:00
opencrypto ktls: Fix non-inplace TLS 1.3 encryption. 2021-03-10 11:07:40 -08:00
powerpc powernv: Include NUMA locality information in the CPU topology 2021-04-01 10:25:57 -04:00
riscv ddb: replace watchpoint set/clear functions 2021-03-29 12:05:44 -03:00
rpc nfs-over-tls: handle res.gid.gid_val correctly for memory allocation 2021-01-12 13:59:52 -08:00
security Add a comment on why the call to mac_vnode_relabel() might be in the wrong 2021-02-27 16:25:26 +00:00
sys Export sbuf_drain to orchestrate lock and drain action 2021-03-31 19:17:37 +02:00
teken
tests Add IPv4 fib lookup performance tests with uniform keys. 2021-03-30 14:32:28 +01:00
tools syscalls.master: Add a new syscall type: RESERVED 2021-01-26 18:27:44 +00:00
ufs softdep_unmount: assert that no dandling dependencies are left 2021-03-12 13:31:08 +02:00
vm Clean up a couple of MD warts in vm_fault_populate(): 2021-03-30 18:15:55 -07:00
x86 gdb: allow setting/removing hardware watchpoints 2021-03-30 11:36:41 -03:00
xdr
xen xen: move x86-specific xen_vector_callback_enabled to sys/x86 2021-03-15 14:20:21 +01:00
Makefile