OpenCloudOS-Kernel/drivers
Tudor Ambarus 86ef1dfcb5 crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
commit 394a9e0447 ("crypto: cfb - add missing 'chunksize' property")
adds a test vector where the input length is smaller than the IV length
(the second test vector). This revealed a NULL pointer dereference in
the atmel-aes driver, that is caused by passing an incorrect offset in
scatterwalk_map_and_copy() when atmel_aes_complete() is called.

Do not save the IV in req->info of ablkcipher_request (or equivalently
req->iv of skcipher_request) when req->nbytes < ivsize, because the IV
will not be further used.

While touching the code, modify the type of ivsize from int to
unsigned int, to comply with the return type of
crypto_ablkcipher_ivsize().

Fixes: 91308019ec ("crypto: atmel-aes - properly set IV after {en,de}crypt")
Cc: <stable@vger.kernel.org>
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-10-10 23:42:45 +11:00
..
accessibility
acpi Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
amba
android
ata
atm
auxdisplay
base
bcma
block
bluetooth
bus ARM: SoC fixes 2019-09-30 10:04:28 -07:00
cdrom
char hwrng: core - move add_early_randomness() out of rng_mutex 2019-10-10 23:36:31 +11:00
clk ARM SCMI fixes for v5.4 2019-09-29 11:20:41 -07:00
clocksource
connector
counter
cpufreq
cpuidle
crypto crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize 2019-10-10 23:42:45 +11:00
dax
dca
devfreq
dio
dma
dma-buf
edac
eisa
extcon
firewire
firmware ARM: SoC fixes 2019-09-30 10:04:28 -07:00
fpga
fsi
gnss
gpio pwm: Changes for v5.4-rc1 2019-09-27 12:19:47 -07:00
gpu drm fixes for 5.4-rc1 2019-09-27 11:13:35 -07:00
greybus
hid
hsi
hv
hwmon ARM SCMI fixes for v5.4 2019-09-29 11:20:41 -07:00
hwspinlock
hwtracing
i2c i2c: slave-eeprom: Add read only mode 2019-09-28 20:44:12 +02:00
i3c
ide
idle
iio
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-28 17:47:33 -07:00
input
interconnect
iommu IOMMU Fixes for Linux v5.4-rc1 2019-09-29 10:00:14 -07:00
ipack
irqchip
isdn
leds
lightnvm
macintosh
mailbox
mcb
md
media
memory
memstick
message
mfd Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2019-09-29 10:24:23 -07:00
misc
mmc mmc: host: sdhci-pci: Add Genesys Logic GL975x support 2019-09-27 20:48:20 +02:00
mtd
mux
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-28 17:47:33 -07:00
nfc NFC: st95hf: clean up indentation issue 2019-09-27 20:31:18 +02:00
ntb
nubus
nvdimm libnvdimm fixes v5.4-rc1 2019-09-29 10:33:41 -07:00
nvme
nvmem
of Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-28 17:47:33 -07:00
opp
oprofile
parisc
parport
pci Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
pcmcia Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
perf
phy
pinctrl
platform
pnp
power
powercap
pps
ps3
ptp ptp: correctly disable flags on old ioctls 2019-09-27 20:25:32 +02:00
pwm pwm: Changes for v5.4-rc1 2019-09-27 12:19:47 -07:00
rapidio
ras
regulator
remoteproc
reset ARM: SoC fixes 2019-09-30 10:04:28 -07:00
rpmsg
rtc
s390
sbus
scsi
sfi
sh
siox
slimbus
soc
soundwire
spi
spmi
ssb
staging
target
tc
tee
thermal Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux-soc-thermal 2019-09-29 10:24:23 -07:00
thunderbolt
tty Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
uio
usb
vfio
vhost
video
virt
virtio
visorbus
vlynq
vme
w1
watchdog linux-watchdog 5.4-rc1 tag 2019-09-27 11:17:38 -07:00
xen
zorro
Kconfig
Makefile