Skip to content

l2tp: remove unsafe calls to l2tp_tunnel_find_nth()

Guillaume Nault netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3l2tp: hold reference on tunnels in netlink dumpsnet/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_netlink.c+30 -33 replies
2/3l2tp: hold reference on tunnels printed in pppol2tp proc filenet/l2tp/l2tp_ppp.c+17 -70 replies
3/3l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs filenet/l2tp/l2tp_core.c net/l2tp/l2tp_core.h net/l2tp/l2tp_debugfs.c+13 -230 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net 0/3] l2tp: remove unsafe calls to l2tp_tunnel_find_nth()

Using l2tp_tunnel_find_nth() is racy, because the returned tunnel can go away as soon as this function returns. This series introduce l2tp_tunnel_get_nth() as a safe replacement to fixes these races.

With this series, all unsafe tunnel/session lookups are finally gone.

Guillaume Nault (3):
l2tp: hold reference on tunnels in netlink dumps
l2tp: hold reference on tunnels printed in pppol2tp proc file
l2tp: hold reference on tunnels printed in l2tp/tunnels debugfs file

 net/l2tp/l2tp_core.c    | 40 ++++++++++++++++++++--------------------
 net/l2tp/l2tp_core.h    |  3 ++-
 net/l2tp/l2tp_debugfs.c | 15 +++++++++++++--
 net/l2tp/l2tp_netlink.c | 11 ++++++++---
 net/l2tp/l2tp_ppp.c     | 24 +++++++++++++++++-------
 5 files changed, 60 insertions(+), 33 deletions(-)
Signature · 1 line
2.17.0