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>] [day] [month] [year] [list]
Message-ID: <CAHM1nT3ERh0MzLst2GLxOZkwD_4grZHXSaZOJrPiOFd13Gauyw@mail.gmail.com>
Date:   Tue, 12 Feb 2019 15:05:22 -0800
From:   IMBRIUS AGER <imbrius.ager@...il.com>
To:     netdev@...r.kernel.org
Subject: Is it safe to modify the data directly instead of bpf helper function
 in tc direct-action mode?

I tried the 3 line code:

__builtin_memcpy(skb, &ip->saddr, &src, sizeof(src);
__builtin_memcpy(skb, &ip->daddr, &dst, sizeof(dst);
ip->check = 0x12;

To my surprise, tc dit not reject the code in direct-action mode.
IIRC, since skb must stays uncloned, the verifier will detect all the
writes, which means we need to do the 'data + X > data_end' check
after each write.

Did I miss anything?

Best wishes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ