Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1680661

Re: 'skb' buffer address information leakage

From Jakub Kicinski <jakub.kicinski@netronome.com>
Newsgroups linux.kernel
Subject Re: 'skb' buffer address information leakage
Date 2017-07-04 07:30 +0200
Message-ID <tZozn-3Ky-1@gated-at.bofh.it> (permalink)
References <tZopI-3Hm-9@gated-at.bofh.it>
Organization Netronome Systems, Ltd.

Show all headers | View raw


On Tue, 4 Jul 2017 13:12:18 +0800, Dison River wrote:
> drivers/net/ethernet/netronome/nfp/nfp_net_debugfs.c:167
>          seq_printf(file, " frag=%p", skb);

FWIW that's actually not a skb pointer.  The structure is defined like
this:

struct nfp_net_tx_buf {
        union { 
                struct sk_buff *skb;
                void *frag;
        };
        dma_addr_t dma_addr;
        short int fidx;
        u16 pkt_cnt;
        u32 real_len;
};

So the line in question is actually reading the frag pointer, I just
reused the skb variable, because this has to be read via READ_ONCE()
and NULL-checked so I thought that doing it separately for skb and
frag is a waste of LOC especially in debug code.  I will queue up a
clean up for after the merge window.

Thanks!

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

'skb' buffer address information leakage Dison River <pwn2river@gmail.com> - 2017-07-04 07:20 +0200
  Re: 'skb' buffer address information leakage Jakub Kicinski <jakub.kicinski@netronome.com> - 2017-07-04 07:30 +0200
  Re: 'skb' buffer address information leakage Greg KH <greg@kroah.com> - 2017-07-04 09:50 +0200
  Re: 'skb' buffer address information leakage Stephen Hemminger <stephen@networkplumber.org> - 2017-07-04 20:20 +0200

csiph-web