aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorXiyu Yang <xiyuyang19@fudan.edu.cn>2020-04-23 13:13:03 +0800
committerDavid S. Miller <davem@davemloft.net>2020-04-23 15:39:39 -0700
commitf35d12971b4d814cdb2f659d76b42f0c545270b6 (patch)
tree6d9a5aae322b7e543997a319914f0a3391cc4fbc /fs
parentmptcp/pm_netlink.c : add check for nla_put_in/6_addr (diff)
downloadlinux-dev-f35d12971b4d814cdb2f659d76b42f0c545270b6.tar.xz
linux-dev-f35d12971b4d814cdb2f659d76b42f0c545270b6.zip
net/x25: Fix x25_neigh refcnt leak when receiving frame
x25_lapb_receive_frame() invokes x25_get_neigh(), which returns a reference of the specified x25_neigh object to "nb" with increased refcnt. When x25_lapb_receive_frame() returns, local variable "nb" becomes invalid, so the refcount should be decreased to keep refcount balanced. The reference counting issue happens in one path of x25_lapb_receive_frame(). When pskb_may_pull() returns false, the function forgets to decrease the refcnt increased by x25_get_neigh(), causing a refcnt leak. Fix this issue by calling x25_neigh_put() when pskb_may_pull() returns false. Fixes: cb101ed2c3c7 ("x25: Handle undersized/fragmented skbs") Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn> Signed-off-by: Xin Tan <tanxin.ctf@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions