diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-05-23 17:25:10 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-13 19:50:10 +0200 |
commit | 23ae585a2f0b6a7cba25dbeeaecd094d1d5552f5 (patch) | |
tree | e164c11244c88bb1546077db6e1a15351b4b2a7d /include/drm/drm_sysfs.h | |
parent | f277940b15eaf529f3a9a8c770044feb19cfd6d2 (diff) |
libceph: NULL deref on crush_decode() error path
[ Upstream commit 293dffaad8d500e1a5336eeb90d544cf40d4fbd8 ]
If there is not enough space then ceph_decode_32_safe() does a goto bad.
We need to return an error code in that situation. The current code
returns ERR_PTR(0) which is NULL. The callers are not expecting that
and it results in a NULL dereference.
Fixes: f24e9980eb86 ("ceph: OSD client")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/drm/drm_sysfs.h')
0 files changed, 0 insertions, 0 deletions