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


Groups > linux.kernel > #1679116

Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID

From Richard Weinberger <richard@nod.at>
Newsgroups linux.kernel
Subject Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID
Date 2017-06-30 22:30 +0200
Message-ID <tYaI9-1Ck-11@gated-at.bofh.it> (permalink)
References <tY9M6-13z-3@gated-at.bofh.it> <tY9VL-16Y-3@gated-at.bofh.it> <tYa5r-1ah-3@gated-at.bofh.it> <tYaf7-1dM-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Florian,

Am 30.06.2017 um 21:55 schrieb Florian Westphal:
>>> Why not use a hash of the address?
>>
>> Would also work. Or xor it with a random number.
>>
>> On the other hand, for user space it would be more useful when the conntrack id
>> does not repeat that often. That's why I favor the good old counter method.
>> Currently the conntrack id is reused very fast.
>> e.g. in one of our applications we use the conntack id via NFQUEUE and watch the
>> destroy events via conntrack. It happens regularly that a new connection has the
>> same id than a different connection we saw some moments before, before we receive
>> the destroy event from the conntrack socket.
> 
> Perhaps we can place that in a new extension (its not needed in any
> fastpath ops)?

To get rid of the infoleak we have to re-introduce the id field in struct nf_conn
and struct nf_conntrack_expect.
Otherwise have nothing to compare against in the conntrack/expect remove case.

So the only question is what to store, IMHO a counter that can wrap around is the
cheapest method and would also not harm the fast-path.

Thanks,
//richard

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


Thread

nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Richard Weinberger <richard@nod.at> - 2017-06-30 21:30 +0200
  Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Florian Westphal <fw@strlen.de> - 2017-06-30 21:40 +0200
    Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Richard Weinberger <richard@nod.at> - 2017-06-30 21:50 +0200
      Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Florian Westphal <fw@strlen.de> - 2017-06-30 22:00 +0200
        Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Richard Weinberger <richard@nod.at> - 2017-06-30 22:30 +0200
          Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Pablo Neira Ayuso <pablo@netfilter.org> - 2017-07-01 11:50 +0200
          Re: nf_conntrack: Infoleak via CTA_ID and CTA_EXPECT_ID Florian Westphal <fw@strlen.de> - 2017-07-01 12:40 +0200

csiph-web