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
| ||
|
Date: Tue, 21 Aug 2018 19:33:08 -0700 From: Doron Roberts-Kedes <doronrk@...com> To: Dominique Martinet <asmadeus@...ewreck.org> CC: Tom Herbert <tom@...ntonium.net>, Dave Watson <davejwatson@...com>, "David S. Miller" <davem@...emloft.net>, <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] strparser: remove any offset before parsing messages On Wed, Aug 22, 2018 at 02:46:47AM +0200, Dominique Martinet wrote: > Yes, the rcv_msg callback itself can get the offset easily, and it's not > that which needs an extra parameter but the bpf function kcm/sockmap are > calling which would need either an extra parameter or changing to get > that value themselves. Ah cool. Thanks for explaining. > For what it's worth, I don't think either are acceptable solutions, I'm > just stating what would a "fix in bpf" would be. Agreed that the discussion should be about whether to fix it up in strparser or sockmap. bpf seems inappropriate. > strparser logic in that case -- it might work to pull in the parser > function but it might not work in rcv for all I know, or the next user > might think that since pull is ok some other operation on the skb is as > well... Just to make sure I understand, is it possible you meant to say that the other way around? Surely the rcv callback can do whatever it wants with the skb. Its the parse callback that may need to be a little more careful with the skb. For the parse case, why not just clone and pull? > As I wrote above, I think it should not be possible, so we're not > even talking about a small percentage here. > The reason I didn't use skb_pull (the head-only variant) is that I'd > rather have the overhead than a BUG() if I'm wrong on this... A printk in that section when (orig_offset + eaten > skb_headlen(head)) confirms that this case is not uncommon or impossible. Would have to do more work to see how many hundreds of times per second, but it is not a philosophical concern.
Powered by blists - more mailing lists