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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sat, 9 Mar 2019 17:07:17 +0800 From: Xin Long <lucien.xin@...il.com> To: Pablo Neira Ayuso <pablo@...filter.org>, Neil Horman <nhorman@...driver.com> Cc: network dev <netdev@...r.kernel.org>, netfilter-devel@...r.kernel.org, Marcelo Ricardo Leitner <marcelo.leitner@...il.com> Subject: Re: [PATCH net] netfilter: set skb transport_header before calling sctp_compute_cksum On Fri, Mar 8, 2019 at 11:50 PM Pablo Neira Ayuso <pablo@...filter.org> wrote: > > Hi, > > On Sun, Mar 03, 2019 at 04:17:21PM +0800, Xin Long wrote: > > sctp_hdr(skb) only works when skb->transport_header is set > > properly. > > > > But in the path of nf_conntrack_in: > > > > sctp_packet() -> sctp_error() -> sctp_compute_cksum(). > > > > skb->transport_header is not guaranteed to be right value > > for sctp. It will cause to fail to check the checksum for > > sctp packets. > > > > So fix it by setting skb transport_header before calling > > sctp_compute_cksum(). > > I see a few more calls to sctp_compute_cksum() in the netfilter tree. > I guess they are broken too. > > In netfilter, skb->transport_header is never set from the input path, > I think this introduces an assymmetry with other transport protocols. > > May we have a variant of sctp_compute_cksum() which does not rely on > sctp_hdr() instead? I posted one before this: https://marc.info/?l=linux-netdev&m=155109395226858&w=2 But from sctp side, Neil preferred sctp_hdr(). We need to either add skb_set_transport_header() in sctp_s/dnat_handler() and sctp_manip_pkt(), or bring that patch back? Now it seems not good to set skb->transport_header in netfilter code. Hi Neil, what's your point now?
Powered by blists - more mailing lists