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]
Date:   Sun, 16 May 2021 21:55:09 -0400
From:   Neal Cardwell <ncardwell@...gle.com>
To:     louisrossberg <louisrossberg@...tonmail.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Netdev <netdev@...r.kernel.org>
Subject: Re: Listening on a TCP socket from a Kernel Module

On Sun, May 16, 2021 at 7:20 PM louisrossberg
<louisrossberg@...tonmail.com> wrote:
>
> Hello, can somebody point me in the right direction for
> what I would use to listen on a TCP socket from the
> kernel? I am working on a kernel module and have spent the
> past day looking through include/net and include/linux for
> something that would allow me to do so. I know TCP
> listening is typically done in userspace, but it should be
> possible at the kernel level right?  tcp_diag looks
> promising, but it seems like that is mainly for monitoring
> sockets, and I'm not sure if I would be able to provide
> responses from it.
>
> Louis Rossberg,
> Warped Technologies

Perhaps kernel_listen() and related functions (kernel_bind(),
kernel_accept(), etc.) in net/socket.c might do the trick for your use
case? Looking at how the callers of these functions structure their
code might give you enough to go on.

(I'm adding the Linux kernel networking mailing list to this thread as well.)

best regards,
neal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ