aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/proc.c
diff options
context:
space:
mode:
authorMatt Johnston <[email protected]>2021-10-14 08:10:50 +0000
committerDavid S. Miller <[email protected]>2021-10-15 10:22:08 +0000
commit0b93aed2842d950e8d2625e975e5a57febeff33d (patch)
tree69a36266a237fb8f644c999888d9cf40abd3f450 /net/ipv4/proc.c
parentMerge branch 'qca8337-improvements' (diff)
downloadkernel-0b93aed2842d950e8d2625e975e5a57febeff33d.tar.gz
kernel-0b93aed2842d950e8d2625e975e5a57febeff33d.zip
mctp: Avoid leak of mctp_sk_key
mctp_key_alloc() returns a key already referenced. The mctp_route_input() path receives a packet for a bind socket and allocates a key. It passes the key to mctp_key_add() which takes a refcount and adds the key to lists. mctp_route_input() should then release its own refcount when setting the key pointer to NULL. In the mctp_alloc_local_tag() path (for mctp_local_output()) we similarly need to unref the key before returning (mctp_reserve_tag() takes a refcount and adds the key to lists). Fixes: 73c618456dc5 ("mctp: locking, lifetime and validity changes for sk_keys") Signed-off-by: Matt Johnston <[email protected]> Reviewed-by: Jeremy Kerr <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/proc.c')
0 files changed, 0 insertions, 0 deletions