freebsd-skq/sys
Sean Eric Fagan f42230d856 Fix another bug introduced during the review process of r344140:
the tag wasn't being computed properly due to chaning a >= comparison
to an == comparison.

Specifically:  CBC-MAC encodes the length of the authorization data
into the the stream to be encrypted/hashed.  For short data, this is
two bytes (big-endian 16 bit value); for larger data, it's 6 bytes
(a prefix of 0xff, 0xfe, followed by a 32-bit big-endian length).  And
there's a larger size, which is 10 bytes.  These extra bytes weren't
being accounted for with the post-review code.  The other bit that then came
into play was that OCF only calls the Update code with blksiz=16, which
meant that I had to ignore the length variable.  (It also means that it
can't be called with a single buffer containing the AAD and payload;
however, OCF doesn't do this for the software-only algorithsm.)

I tested with this script:

ALG=aes-ccm
DEV=soft

for aad in 0 1 2 3 4 14 16 24 30 32 34 36 1020
do
        for dln in 16 32 1024 2048 10240
        do
                echo "Testing AAD length ${aad} data length ${dln}"
                /root/cryptocheck -A ${aad} -a ${ALG} -d ${DEV} ${dln}
        done
done

Reviewed by:	cem
Sponsored by:	iXsystems Inc.
2019-02-25 19:14:16 +00:00
..
amd64 Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
arm Add base to the warning threshold. 2019-02-22 03:11:27 +00:00
arm64 arm64: rockchip: clk: Set the write mask when setting the clock mux 2019-02-25 17:40:00 +00:00
bsm Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
cam Free some space in struct ctl_io_hdr for better use. 2019-02-23 23:35:52 +00:00
cddl Commit a missing piece of r344452. 2019-02-21 22:56:54 +00:00
compat import linux debugfs support 2019-02-23 20:56:41 +00:00
conf gcov support 2019-02-23 21:14:00 +00:00
contrib MFV: r344447 2019-02-21 21:33:27 +00:00
crypto Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
ddb ddb: Print the thread's pcb in 'show thread' 2019-02-09 21:08:19 +00:00
dev Fix a paste-o that broke the build on all arches. 2019-02-25 18:11:59 +00:00
dts Adapt FreeBSD specific DT stub for Jetson TK1 board to be consistent with 2019-02-06 06:03:44 +00:00
fs fuse: Fix a regression introduced in r337165 2019-02-21 02:41:57 +00:00
gdb
geom Define a constant for the maximum number of GEOM_CTL arguments. 2019-02-20 17:07:08 +00:00
gnu gcov support 2019-02-23 21:14:00 +00:00
i386 Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
isa
kern Check the index hasn't changed after writing the cmp entry. 2019-02-25 13:15:34 +00:00
kgssapi * Handle SIGPIPE in gssd 2019-02-21 01:30:37 +00:00
libkern Add non-sleepable strdup variant strdup_flags 2019-02-20 20:48:10 +00:00
mips o Get rid of silly comment which seems to have got life of its own via 2019-02-23 00:00:49 +00:00
modules nvdimm: Simple namespace support 2019-02-22 19:54:28 +00:00
net iflib: Improve return values of interrupt handlers. 2019-02-15 18:51:43 +00:00
net80211 net80211(4): hide casts for 'i_seq' field offset calculation inside 2019-02-10 23:58:56 +00:00
netgraph Remove remnants of byte order manipulation, back when FreeBSD stack 2019-02-09 03:00:00 +00:00
netinet Make arp code return (more) errors. 2019-02-24 22:49:56 +00:00
netinet6 When dropping a fragment queue count the number of fragments in the queue 2019-02-19 19:57:55 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Small performance tweak 2019-02-24 17:23:55 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
opencrypto Fix another bug introduced during the review process of r344140: 2019-02-25 19:14:16 +00:00
powerpc Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
riscv Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
rpc Bump the default kern.rpc.gss.client_max from 128 to 1024. 2019-02-19 11:07:02 +00:00
security Create new EINTEGRITY error with message "Integrity check failed". 2019-01-17 06:35:45 +00:00
sparc64 Add kernel support for Intel userspace protection keys feature on 2019-02-20 09:51:13 +00:00
sys Remove unintend change to capability.h from r344530 2019-02-25 18:25:53 +00:00
teken Attempt to complete fixing programmable function keys for syscons. 2019-02-20 02:14:41 +00:00
tests Regularize the Netflix copyright 2019-02-04 21:28:25 +00:00
tools make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs This bug was introduced with the change to use softdep_bp_to_mp() in 2019-01-28 21:36:45 +00:00
vm Clear pointers to indicate that the respective locks are released. 2019-02-21 15:44:32 +00:00
x86 Add usermode helpers for for Intel userspace protection keys feature. 2019-02-20 09:56:23 +00:00
xdr
xen xen: introduce a new way to setup event channel upcall 2019-01-30 11:34:52 +00:00
Makefile