]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
crypto: af_alg - whitelist mask and type
authorStephan Mueller <smueller@chronox.de>
Tue, 2 Jan 2018 07:55:25 +0000 (08:55 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Sat, 3 Feb 2018 17:40:41 +0000 (18:40 +0100)
commit7686119e339f0e841efbb02514bd3b288a65e66e
tree089c24207c55de96aa464e83f0adcfdf724b1446
parentf7df26401d81dd6d95759ce9622fdd5c513fa4dd
crypto: af_alg - whitelist mask and type

BugLink: http://bugs.launchpad.net/bugs/1747169
commit bb30b8848c85e18ca7e371d0a869e94b3e383bdf upstream.

The user space interface allows specifying the type and mask field used
to allocate the cipher. Only a subset of the possible flags are intended
for user space. Therefore, white-list the allowed flags.

In case the user space caller uses at least one non-allowed flag, EINVAL
is returned.

Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
crypto/af_alg.c