An error occurred while fetching folder content.
ASN.1: Fix non-match detection failure on data overrun
David Howells authored
If the ASN.1 decoder is asked to parse a sequence of objects, non-optional
matches get skipped if there's no more data to be had rather than a
data-overrun error being reported.

This is due to the code segment that decides whether to skip optional
matches (ie. matches that could get ignored because an element is marked
OPTIONAL in the grammar) due to a lack of data also skips non-optional
elements if the data pointer has reached the end of the buffer.

This can be tested with the data decoder for the new RSA akcipher algorithm
that takes three non-optional integers.  Currently, it skips the last
integer if there is insufficient data.

Without the fix, #defining DEBUG in asn1_decoder.c will show something
like:

	next_op: pc=0/13 dp=0/270 C=0 J=0
	- match? 30 30 00
	- TAG: 30 266 CONS
	next_op: pc=2/13 dp=4/270 C=1 J=0
	- match? 02 02 00
	- TAG: 02 257
	- LEAF: 257
	next_op: pc=5/13 dp=265/270 C=1 J=0
	- match? 02 02 00
	- TAG: 02 3
	- LEAF: 3
	next_o...
0d62e9dd
Name Last commit Last update
..
842 lib: correct 842 decompress for 32 bit
fonts fonts: Add 6x10 font
lz4 lz4: fix system halt at boot kernel on x86_64
lzo lzo: check for length overrun in variable length encoding.
mpi Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
raid6 Merge tag 'powerpc-4.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
reed_solomon lib: Remove unnecessary inclusions of asm/semaphore.h
xz lib/xz: enable all filters by default in Kconfig
zlib_deflate zlib: clean up some dead code
zlib_inflate zlib: clean up some dead code
.gitignore X.509: Implement simple static OID registry
Kconfig Merge tag 'libnvdimm-for-4.2' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm
Kconfig.debug sched/stat: Simplify the sched_info accounting dependency
Kconfig.kasan x86/kasan: Move KASAN_SHADOW_OFFSET to the arch Kconfig
Kconfig.kgdb kdb: Allow access to sensitive commands to be restricted by default
Kconfig.kmemcheck kmemcheck: depend on HAVE_ARCH_KMEMCHECK
Makefile Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
argv_split.c argv_split(): teach it to handle mutable strings
asn1_decoder.c ASN.1: Fix non-match detection failure on data overrun
assoc_array.c assoc_array: Include rcupdate.h for call_rcu() definition
atomic64.c locking,arch: Rewrite generic atomic support
atomic64_test.c lib/atomic64_test.c: convert printk(KERN_INFO to pr_info
audit.c syscalls: implement execveat() system call
average.c lib: Ensure EWMA does not store wrong intermediate values
bcd.c usb/core: use bin2bcd() for bcdDevice in RH
bch.c
bitmap.c
bitrev.c
bsearch.c
btree.c
bug.c
build_OID_registry
bust_spinlocks.c
check_signature.c
checksum.c
clz_ctz.c
clz_tab.c
cmdline.c
compat_audit.c
cordic.c
cpu-notifier-error-inject.c
cpu_rmap.c
cpumask.c
crc-ccitt.c
crc-itu-t.c
crc-t10dif.c
crc16.c
crc32.c
crc32defs.h
crc7.c
crc8.c
ctype.c
debug_info.c
debug_locks.c
debugobjects.c
dec_and_lock.c
decompress.c
decompress_bunzip2.c
decompress_inflate.c
decompress_unlz4.c
decompress_unlzma.c
decompress_unlzo.c
decompress_unxz.c
devres.c
digsig.c
div64.c
dma-debug.c
dump_stack.c
dynamic_debug.c
dynamic_queue_limits.c
earlycpio.c
extable.c
fault-inject.c
fdt.c
fdt_empty_tree.c
fdt_ro.c
fdt_rw.c
fdt_strerror.c
fdt_sw.c
fdt_wip.c
find_bit.c
flex_array.c
flex_proportions.c
gcd.c
gen_crc32table.c
genalloc.c
glob.c
halfmd4.c
hexdump.c
hweight.c
idr.c
inflate.c
int_sqrt.c
interval_tree.c
interval_tree_test.c
iomap.c
iomap_copy.c
iommu-common.c
iommu-helper.c
ioremap.c