Skip to content

RFC Fix TCP short AF_UNSPEC handling

Matthieu Buffet linux-security-module 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3selftests/landlock: Fix TCP bind(AF_UNSPEC) test casetools/testing/selftests/landlock/common.h tools/testing/selftests/landlock/net_test.c+16 -10 replies
2/3selftests/landlock: Add missing connect(minimal AF_UNSPEC) testtools/testing/selftests/landlock/net_test.c+13 -10 replies
3/3landlock: Fix TCP handling of short AF_UNSPEC addressessecurity/landlock/net.c+67 -511 reply

Reviews trailers per patch

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

Read the v1 thread

Cover letter [RFC PATCH v1 0/3] Fix TCP short AF_UNSPEC handling

Hi Mickaël, Günther, Konstantin, Mikhail,

Here's a small fix for userland behaviour+error consistency in TCP, in the edge case where userland uses an AF_UNSPEC address consisting of just a bare sa_family_t.
First two commits fix/add test cases (which then fail), and third commit patches current_check_access_socket() to make these tests pass. There's more than one way to patch it, I just chose this because it should also make it easier to merge UDP support (soon if this goes well). Feedback welcome!

Matthieu Buffet (3):
selftests/landlock: Fix TCP bind(AF_UNSPEC) test case selftests/landlock: Add missing connect(minimal AF_UNSPEC) test
landlock: Fix TCP handling of short AF_UNSPEC addresses

 security/landlock/net.c                     | 118 +++++++++++---------
 tools/testing/selftests/landlock/common.h   |   1 +
 tools/testing/selftests/landlock/net_test.c |  30 ++++-
 3 files changed, 96 insertions(+), 53 deletions(-)

base-commit: 6dde339a3df80a57ac3d780d8cfc14d9262e2acd

Signature · 1 line
2.47.2