opnsense-src/sys
Pedro F. Giffuni c820acbf0a msdosfs: fixes for Undefined Behavior.
These were found by the Undefined Behaviour GsoC project at NetBSD:

Do not change signedness bit with left shift.
While there avoid signed integer overflow.
Address both issues with using unsigned type.

msdosfs_fat.c:512:42, left shift of 1 by 31 places cannot be represented
in type 'int'
msdosfs_fat.c:521:44, left shift of 1 by 31 places cannot be represented
in type 'int'
msdosfs_fat.c:744:14, left shift of 1 by 31 places cannot be represented
in type 'int'
msdosfs_fat.c:744:24, signed integer overflow: -2147483648 - 1 cannot be
represented in type 'int [20]'
msdosfs_fat.c:840:13, left shift of 1 by 31 places cannot be represented
in type 'int'
msdosfs_fat.c:840:36, signed integer overflow: -2147483648 - 1 cannot be
represented in type 'int [20]'

Detected with micro-UBSan in the user mode.

Hinted from:	NetBSD (CVS 1.33)
MFC after:	2 weeks
Differenctial Revision:	https://reviews.freebsd.org/D16615
2018-08-08 15:08:22 +00:00
..
amd64 Futex support functions in linux.ko and linux32.ko on amd64 should be 2018-08-07 18:29:10 +00:00
arm Implement atomic_swap_64(9). 2018-08-07 18:56:01 +00:00
arm64 efirt: Don't enter EFI context early, convert addrs to KVA instead 2018-08-04 21:41:10 +00:00
bsm sys: further adoption of SPDX licensing ID tags. 2017-11-20 19:43:44 +00:00
cam For the dynamic I/O scheduler, make the TRIM stuff also count against 2018-07-26 22:55:51 +00:00
cddl Reduce taskq and context-switch cost of zio pipe 2018-08-03 02:16:45 +00:00
compat Update the list of architectures having atomic_fcmpset_{8,16,64}(9) and 2018-08-07 18:59:02 +00:00
conf Remove jedec_ts(4) 2018-08-01 08:24:34 +00:00
contrib Remove redundant and incorrect default definition of AF_INET6. AF_INET6 2018-08-07 07:12:59 +00:00
crypto libmd: Always erase context in _Final method, and when doing 2018-07-20 07:01:28 +00:00
ddb Extend show proc with reaper, sigparent, and vmspace information 2018-05-25 13:59:48 +00:00
dev - Fix hash calculation by MAC address 2018-08-08 01:20:02 +00:00
dts Remove Atmel AT91RM9200 and AT91SAM9 support. 2018-07-27 18:28:22 +00:00
fs msdosfs: fixes for Undefined Behavior. 2018-08-08 15:08:22 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
gnu dts: Update our copy to Linux 4.17 2018-06-14 07:12:10 +00:00
i386 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
isa Revert r330780, it was improperly tested and results in taking a spin 2018-03-11 20:13:15 +00:00
kern Followup to r337430: only call elf_reloc_ifunc on x86. 2018-08-07 20:43:50 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern Sync strlcpy with userland version, again 2018-06-21 17:35:13 +00:00
mips Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
modules uep(4): add evdev support 2018-08-05 11:14:13 +00:00
net pf: Increase default hash table size 2018-08-05 13:54:37 +00:00
net80211 net80211: Fix ifdetach w/o ifattach, small whitespace cleanup 2018-07-10 23:30:19 +00:00
netgraph Use if_tunnel_check_nesting() for ng_iface(4). 2018-08-03 22:55:58 +00:00
netinet Fix a small bug in rack where it will 2018-08-08 13:36:49 +00:00
netinet6 Add a dtrace provider for UDP-Lite. 2018-07-31 22:56:03 +00:00
netipsec Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netpfil Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netsmb Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient style: Remove remaining deprecated MALLOC/FREE macros 2018-01-25 22:25:13 +00:00
nfsserver sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed Only NULL check the VNET pointer when VIMAGE is enabled in ibcore. 2018-07-31 11:23:44 +00:00
opencrypto Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
powerpc Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
riscv Implement atomic_swap_{int,long,ptr}(9). 2018-08-07 18:56:51 +00:00
rpc Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. 2018-07-20 12:03:16 +00:00
security Require that MAC label buffers be able to store a non-empty string. 2018-08-01 03:46:07 +00:00
sparc64 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
sys Improve handling of control message truncation. 2018-08-07 16:36:48 +00:00
teken teken: Fix sequences header which was crossing the 80-col boundary 2018-05-29 08:41:44 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools Add dtb overlays support 2018-03-24 21:30:24 +00:00
ufs Put in place the framework for consolodating contiguous blocks into 2018-08-06 21:09:11 +00:00
vm Defer and aggregate swap_pager_meta_build frees. 2018-08-08 02:30:34 +00:00
x86 Verify that each frame pointer lies within the thread's kstack. 2018-08-03 02:51:37 +00:00
xdr sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
xen xen: add missing file from r336474 2018-07-19 10:14:52 +00:00
Makefile Move sys/boot to stand. Fix all references to new location 2017-11-14 23:02:19 +00:00