diff options
author | Congyu Liu <liu3101@purdue.edu> | 2022-01-18 14:20:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-01 17:27:07 +0100 |
commit | e43669c77cb3a742b7d84ecdc7c68c4167a7709b (patch) | |
tree | de425b29336196e37688aba873ee4c1d29af9b57 /drivers/hwmon/lm90.c | |
parent | 1515e72aae803fc6b466adf918e71c4e4c9d5b3d (diff) |
net: fix information leakage in /proc/net/ptype
commit 47934e06b65637c88a762d9c98329ae6e3238888 upstream.
In one net namespace, after creating a packet socket without binding
it to a device, users in other net namespaces can observe the new
`packet_type` added by this packet socket by reading `/proc/net/ptype`
file. This is minor information leakage as packet socket is
namespace aware.
Add a net pointer in `packet_type` to keep the net namespace of
of corresponding packet socket. In `ptype_seq_show`, this net pointer
must be checked when it is not NULL.
Fixes: 2feb27dbe00c ("[NETNS]: Minor information leak via /proc/net/ptype file.")
Signed-off-by: Congyu Liu <liu3101@purdue.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hwmon/lm90.c')
0 files changed, 0 insertions, 0 deletions