]> Git Repo - linux.git/commit
nfc: fix refcount leak in llcp_sock_connect()
authorXiaoming Ni <[email protected]>
Thu, 25 Mar 2021 03:51:11 +0000 (11:51 +0800)
committerDavid S. Miller <[email protected]>
Fri, 26 Mar 2021 00:02:01 +0000 (17:02 -0700)
commit8a4cd82d62b5ec7e5482333a72b58a4eea4979f0
treea2aceb4a5f1e39498f692eeaaf45521a2f24dcaf
parentc33b1cc62ac05c1dbb1cdafe2eb66da01c76ca8d
nfc: fix refcount leak in llcp_sock_connect()

nfc_llcp_local_get() is invoked in llcp_sock_connect(),
but nfc_llcp_local_put() is not invoked in subsequent failure branches.
As a result, refcount leakage occurs.
To fix it, add calling nfc_llcp_local_put().

fix CVE-2020-25671
Fixes: c7aa12252f51 ("NFC: Take a reference on the LLCP local pointer when creating a socket")
Reported-by: "kiyin(尹亮)" <[email protected]>
Link: https://www.openwall.com/lists/oss-security/2020/11/01/1
Cc: <[email protected]> #v3.6
Signed-off-by: Xiaoming Ni <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/nfc/llcp_sock.c
This page took 0.054727 seconds and 4 git commands to generate.