From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968165AbeAOOPa (ORCPT + 1 other); Mon, 15 Jan 2018 09:15:30 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:34974 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965726AbeAOOP0 (ORCPT ); Mon, 15 Jan 2018 09:15:26 -0500 X-Google-Smtp-Source: ACJfBosLQ5/yGe3WK0cL1eaB9QAjuZPMwQl92OVpLL+/YNY2MHAY4fVlgF+Wn6Pqt2ciiPylI0LH0QpgjZ3nHL3RAB4= MIME-Version: 1.0 From: Dmitry Vyukov Date: Mon, 15 Jan 2018 15:15:04 +0100 Message-ID: Subject: KASAN poisoning for skb linear data To: David Miller , Willem de Bruijn , Eric Dumazet , netdev , LKML , kasan-dev , Cong Wang , andreyknvl Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: Hi, As far as I understand pskb_may_pull() plays important role in packet parsing for all protocols. And we did custom fragmentation of packets emitted via tun (IFF_NAPI_FRAGS). However, it seems that it does not give any results (bugs found), and I think the reason for this is that linear data is rounded up and is usually quite large. So if a parsing function does pskb_may_pull(1), or does not do it at all, it can usually access more and it will go unnoticed. KASAN has an ability to do custom poisoning: it can poison/unpoison any memory range, and then detect any reads/writes to that range. What do you think about adding custom KASAN poisoning to pskb_may_pull() and switching it to non-eager mode (pull only what was requested) under KASAN? Do you think it has potential for finding important bugs? What amount of work is this? Thanks