Eric Biggers
a1e25420a4
libceph: don't WARN() if user tries to add invalid key
...
commit b11270853fa3654f08d4a6a03b23ddb220512d8d upstream.
The WARN_ON(!key->len) in set_secret() in net/ceph/crypto.c is hit if a
user tries to add a key of type "ceph" with an invalid payload as
follows (assuming CONFIG_CEPH_LIB=y):
echo -e -n '\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' \
| keyctl padd ceph desc @s
This can be hit by fuzzers. As this is merely bad input and not a
kernel bug, replace the WARN_ON() with return -EINVAL.
Fixes: 7af3ea189a9a ("libceph: stop allocating a new cipher on every crypto request")
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-30 08:39:03 +00:00
..
crush
crush: remove redundant local variable
2016-10-05 23:02:10 +02:00
armor.c
libceph: Fix base64-decoding when input ends in newline.
2011-03-15 09:14:02 -07:00
auth.c
libceph: ceph_build_auth() doesn't need ceph_auth_build_hello()
2016-10-03 16:13:50 +02:00
auth_none.c
libceph: rename ceph_entity_name_encode() -> ceph_auth_entity_name_encode()
2016-08-24 23:49:15 +02:00
auth_none.h
libceph: make authorizer destruction independent of ceph_auth_client
2016-04-25 20:54:13 +02:00
auth_x.c
libceph: switch ceph_x_decrypt() to ceph_crypt()
2017-01-26 08:24:42 +01:00
auth_x.h
libceph: rename and align ceph_x_authorizer::reply_buf
2017-01-26 08:24:41 +01:00
auth_x_protocol.h
buffer.c
libceph: nuke ceph_kvfree()
2014-12-17 20:09:50 +03:00
ceph_common.c
rbd: add 'client_addr' sysfs rbd device attribute
2016-08-24 23:49:16 +02:00
ceph_fs.c
libceph: fix legacy layout decode with pool 0
2016-11-10 20:13:08 +01:00
ceph_hash.c
net: cleanup unsigned to unsigned int
2012-04-15 12:44:40 -04:00
ceph_strings.c
rbd: support for exclusive-lock feature
2016-08-24 23:49:16 +02:00
cls_lock_client.c
libceph: support for lock.lock_info
2016-08-24 23:49:15 +02:00
crypto.c
libceph: don't WARN() if user tries to add invalid key
2017-11-30 08:39:03 +00:00
crypto.h
libceph: stop allocating a new cipher on every crypto request
2017-01-26 08:24:46 +01:00
debugfs.c
libceph: rados pool namespace support
2016-07-28 02:55:37 +02:00
Kconfig
libceph: select CRYPTO_CBC in addition to CRYPTO_AES
2014-10-14 21:03:20 +04:00
Makefile
libceph: support for advisory locking on RADOS objects
2016-08-24 23:49:15 +02:00
messenger.c
libceph: force GFP_NOIO for socket allocations
2017-04-08 09:30:30 +02:00
mon_client.c
libceph: support for blacklisting clients
2016-08-24 23:49:15 +02:00
msgpool.c
libceph: fix some missing includes
2016-07-28 02:55:35 +02:00
osd_client.c
ceph: update readpages osd request according to size of pages
2017-03-12 06:41:53 +01:00
osdmap.c
libceph: don't set weight to IN when OSD is destroyed
2017-03-30 09:41:27 +02:00
pagelist.c
mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
2016-04-04 10:41:08 -07:00
pagevec.c
mm: replace get_user_pages_unlocked() write/force parameters with gup_flags
2016-10-18 14:13:37 -07:00
snapshot.c
libceph: create source file "net/ceph/snapshot.c"
2013-05-01 21:20:08 -07:00
string_table.c
libceph: using kfree_rcu() to simplify the code
2016-08-08 21:41:42 +02:00