freebsd-nq/sys
Conrad Meyer ea5eee641e Fix information leak in geli(8) integrity mode
In integrity mode, a larger logical sector (e.g., 4096 bytes) spans several
physical sectors (e.g., 512 bytes) on the backing device.  Due to hash
overhead, a 4096 byte logical sector takes 8.5625 512-byte physical sectors.
This means that only 288 bytes (256 data + 32 hash) of the last 512 byte
sector are used.

The memory allocation used to store the encrypted data to be written to the
physical sectors comes from malloc(9) and does not use M_ZERO.

Previously, nothing initialized the final physical sector backing each
logical sector, aside from the hash + encrypted data portion.  So 224 bytes
of kernel heap memory was leaked to every block :-(.

This patch addresses the issue by initializing the trailing portion of the
physical sector in every logical sector to zeros before use.  A much simpler
but higher overhead fix would be to tag the entire allocation M_ZERO.

PR:		222077
Reported by:	Maxim Khitrov <max AT mxcrypt.com>
Reviewed by:	emaste
Security:	yes
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D12272
2017-09-09 01:41:01 +00:00
..
amd64 Add smn(4) driver for AMD System Management Network 2017-09-05 15:13:41 +00:00
arm Add Armada 80x0/70x0 compatible to 38x RTC driver 2017-09-05 05:45:57 +00:00
arm64 Not all CPUs handle reading ID_AA64MMFR2_EL1 (e.g. qemu), disable it for now. 2017-09-08 08:02:06 +00:00
boot Be consistent and do return (1); 2017-09-07 15:46:44 +00:00
bsm
cam cam(4): Fix some warnings 2017-09-07 07:24:22 +00:00
cddl Enable dtrace support for mips64 and the ERL kernel config 2017-09-06 03:19:52 +00:00
compat Correct bintime32 declaration: uint32_t sec -> time32_t sec. 2017-09-08 18:32:13 +00:00
conf Introduce __read_frequently 2017-09-06 20:32:49 +00:00
contrib Merge pipes and socket pairs. 2017-09-05 07:46:45 +00:00
crypto aesni: quiet -Wcast-qual 2017-08-16 22:54:35 +00:00
ddb Rename mkdumpheader() and group EKCD functions in kern_shutdown.c. 2017-08-18 04:04:09 +00:00
dev Refactor interrupt allocation and deallocation. Add some extra 2017-09-08 20:20:35 +00:00
fs Style. 2017-08-28 21:04:56 +00:00
gdb
geom Fix information leak in geli(8) integrity mode 2017-09-09 01:41:01 +00:00
gnu Update DTS files from Linux 4.12 2017-07-09 13:53:32 +00:00
i386 Revert r323087 2017-09-01 17:03:48 +00:00
isa Use better hard-coded defaults for the cursor shape, and remove nearby 2017-08-19 19:33:16 +00:00
kern namecache: fold the unlock label into the only consumer 2017-09-08 06:57:11 +00:00
kgssapi
libkern x86/crc32_sse42.c: quiet unused function warning 2017-08-11 17:05:31 +00:00
mips Enable dtrace support for mips64 and the ERL kernel config 2017-09-06 03:19:52 +00:00
modules Enable dtrace support for mips64 and the ERL kernel config 2017-09-06 03:19:52 +00:00
net Make LACP based lagg work with interfaces (like 100Gbps and 25Gbps) that 2017-09-06 14:36:35 +00:00
net80211 net80211: fix a typo (premable -> preamble). 2017-08-27 22:13:03 +00:00
netgraph
netinet Add support for generic backpressure indicator for ratelimited 2017-09-06 13:56:18 +00:00
netinet6 After inpcb route caching was put back in place there is no need for 2017-07-27 13:03:36 +00:00
netipsec Fix possible double releasing for SA reference. 2017-09-01 11:51:07 +00:00
netpfil pf_get_sport(): Prevent possible endless loop when searching for an unused nat port 2017-08-08 21:09:26 +00:00
netsmb
nfs Improve FHA locality control for NFS read/write requests. 2017-07-31 15:23:19 +00:00
nfsclient
nfsserver
nlm
ofed Fix indentation. 2017-09-07 19:15:31 +00:00
opencrypto
powerpc Revert r323087 2017-09-01 17:03:48 +00:00
riscv Revert r323087 2017-09-01 17:03:48 +00:00
rpc
security Sprinkle __read_frequently on few obvious places. 2017-09-06 20:33:33 +00:00
sparc64 Revert r323087 2017-09-01 17:03:48 +00:00
sys Allow __builtin_memset instead of bzero for small buffers of known size 2017-09-08 20:09:14 +00:00
teken Fix syscons escape sequence for setting the local cursor type. This sequence 2017-08-18 15:40:40 +00:00
tests
tools
ufs The new fsck recovery information to enable it to find backup 2017-09-04 20:19:36 +00:00
vm Speed up vm_page_array initialization. 2017-09-07 21:43:39 +00:00
x86 Enhance qpi.c to make it usable on all Core-microarchitecture Xeons. 2017-09-08 19:51:03 +00:00
xdr
xen
Makefile