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-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 29 Oct 2020 13:01:53 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Pablo Neira Ayuso <pablo@...filter.org>,
        netfilter-devel@...r.kernel.org, Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH nf 2/2] netfilter: use actual socket sk rather than skb sk
 when routing harder

As a historical note, this code goes all the way back to Rusty in
2.3.14, where it looked like this:

#ifdef CONFIG_NETFILTER
/* To preserve the cute illusion that a locally-generated packet can
  be mangled before routing, we actually reroute if a hook altered
  the packet. -RR */
static int route_me_harder(struct sk_buff *skb)
{
       struct iphdr *iph = skb->nh.iph;
       struct rtable *rt;

       if (ip_route_output(&rt, iph->daddr, iph->saddr,
                           RT_TOS(iph->tos) | RTO_CONN,
                           skb->sk ? skb->sk->bound_dev_if : 0)) {
               printk("route_me_harder: No more route.\n");
               return -EINVAL;
       }

       /* Drop old route. */
       dst_release(skb->dst);

       skb->dst = &rt->u.dst;
       return 0;
}
#endif

And until now, it was never updated to take the separate sock *sk parameter.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ