Commit 0bdc56f6 authored by Ziyang Xuan's avatar Ziyang Xuan
Browse files

NFC: digital: fix possible memory leak in digital_in_send_sdd_req()

stable inclusion
from stable-v4.19.213
commit 071bdef36391958c89af5fa2172f691b31baa212
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9RBH0


CVE: CVE-2021-47442

--------------------------------

commit 291c932f upstream.

'skb' is allocated in digital_in_send_sdd_req(), but not free when
digital_in_send_cmd() failed, which will cause memory leak. Fix it
by freeing 'skb' if digital_in_send_cmd() return failed.

Fixes: 2c66daec ("NFC Digital: Add NFC-A technology support")
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZiyang Xuan <william.xuanziyang@huawei.com>
parent 03933bd1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment