diff options
author | Pan Bian <bianpan2016@163.com> | 2019-11-05 16:34:07 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-11-05 18:31:45 -0800 |
commit | 517ce4e93368938b204451285e53014549804868 (patch) | |
tree | 9f008c3686a07c14bb796394768b7add00afa8a3 | |
parent | f75359f3ac855940c5718af10ba089b8977bf339 (diff) | |
download | linux-stable-517ce4e93368938b204451285e53014549804868.tar.gz linux-stable-517ce4e93368938b204451285e53014549804868.tar.bz2 linux-stable-517ce4e93368938b204451285e53014549804868.zip |
NFC: fdp: fix incorrect free object
The address of fw_vsc_cfg is on stack. Releasing it with devm_kfree() is
incorrect, which may result in a system crash or other security impacts.
The expected object to free is *fw_vsc_cfg.
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/nfc/fdp/i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nfc/fdp/i2c.c b/drivers/nfc/fdp/i2c.c index 1cd113c8d7cb..ad0abb1f0bae 100644 --- a/drivers/nfc/fdp/i2c.c +++ b/drivers/nfc/fdp/i2c.c @@ -259,7 +259,7 @@ static void fdp_nci_i2c_read_device_properties(struct device *dev, *fw_vsc_cfg, len); if (r) { - devm_kfree(dev, fw_vsc_cfg); + devm_kfree(dev, *fw_vsc_cfg); goto vsc_read_err; } } else { |