[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEih1qXHkgHzqk1yXd=iX9fiMCkJW95eoytc1t5-VRMPhfTRNg@mail.gmail.com>
Date: Fri, 3 Feb 2023 16:12:00 +0100
From: Pietro Borrello <borrello@...g.uniroma1.it>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Lorenzo Colitti <lorenzo@...gle.com>,
Stephen Hemminger <stephen@...workplumber.org>,
Cristiano Giuffrida <c.giuffrida@...nl>,
"Bos, H.J." <h.j.bos@...nl>, Jakob Koschel <jkl820.git@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v2 1/2] tun: tun_chr_open(): correctly initialize
socket uid
On Fri, 3 Feb 2023 at 15:58, Eric Dumazet <edumazet@...gle.com> wrote:
>
> This seems very fragile...
> "struct inode" could be made bigger, and __randomize_layout could move i_uid
> at the end of it.
>
> KASAN could then detect an out-of-bound access in sock_init_data()
>
> I would rather add a wrapper like this [1], then change tun/tap to use
> sock_init_data_uid()
>
I agree this is a much cleaner solution.
I'll wait the usual 24h for further comments, and send a patch like this in v3.
Best regards,
Pietro
Powered by blists - more mailing lists