lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b22d1b62-a6b1-4dd6-9ccb-827442846f3c@roeck-us.net>
Date: Fri, 2 Feb 2024 09:21:22 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Chuck Lever <chuck.lever@...cle.com>
Cc: kernel-tls-handshake@...ts.linux.dev, netdev@...r.kernel.org
Subject: Persistent problem with handshake unit tests

Hi,

when running handshake kunit tests in qemu, I always get the following
failure.

    KTAP version 1
    # Subtest: Handshake API tests
    1..11
        KTAP version 1
        # Subtest: req_alloc API fuzzing
        ok 1 handshake_req_alloc NULL proto
        ok 2 handshake_req_alloc CLASS_NONE
        ok 3 handshake_req_alloc CLASS_MAX
        ok 4 handshake_req_alloc no callbacks
        ok 5 handshake_req_alloc no done callback
        ok 6 handshake_req_alloc excessive privsize
        ok 7 handshake_req_alloc all good
    # req_alloc API fuzzing: pass:7 fail:0 skip:0 total:7
    ok 1 req_alloc API fuzzing
    ok 2 req_submit NULL req arg
    ok 3 req_submit NULL sock arg
    ok 4 req_submit NULL sock->file
    ok 5 req_lookup works
    ok 6 req_submit max pending
    ok 7 req_submit multiple
    ok 8 req_cancel before accept
    ok 9 req_cancel after accept
    ok 10 req_cancel after done
    # req_destroy works: EXPECTATION FAILED at net/handshake/handshake-test.c:478
    Expected handshake_req_destroy_test == req, but
        handshake_req_destroy_test == 00000000
        req == c5080280
    not ok 11 req_destroy works
# Handshake API tests: pass:10 fail:1 skip:0 total:11
# Totals: pass:16 fail:1 skip:0 total:17
not ok 31 Handshake API tests
############## destroy 0xc5080280
...

The line starting with "#######" is from added debug information.

diff --git a/net/handshake/handshake-test.c b/net/handshake/handshake-test.c
index 16ed7bfd29e4..a2417c56fe15 100644
--- a/net/handshake/handshake-test.c
+++ b/net/handshake/handshake-test.c
@@ -434,6 +434,7 @@ static struct handshake_req *handshake_req_destroy_test;

 static void test_destroy_func(struct handshake_req *req)
 {
+       pr_info("############## destroy 0x%px\n", req);
        handshake_req_destroy_test = req;
 }

It appears that the destroy function works, but is delayed. Unfortunately,
I don't know enough about the network subsystem and/or the handshake
protocol to suggest a fix. I'd be happy to submit a fix if you let me know
how that should look like.

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ