On Sat, May 29, 2021 at 12:31:55AM +0200, Rodrigo Campos wrote: > On Fri, May 28, 2021 at 7:14 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote: > > > > On Fri, May 28, 2021 at 05:27:39PM +0200, Rodrigo Campos wrote: > > > On Thu, May 27, 2021 at 8:42 PM Kees Cook <keescook@xxxxxxxxxxxx> wrote: > > > > > > > > On Thu, May 27, 2021 at 01:51:13PM +0200, Rodrigo Campos wrote: > > > > > > > > > > Kees, as I mentioned in the linked thread, this issue is present in > > > > > 5.9+ kernels. Should we add the cc to stable for this patch? Or should > > > > > we cc to stable the one linked, that just fixes the issue without > > > > > semantic changes to userspace? > > > > > > > > It sounds like the problem is with Go, using addfd, on 5.9-5.13 kernels, > > > > yes? > > > > > > Yes. > > > > > > > Would the semantic change be a problem there? (i.e. it sounds like > > > > the semantic change was fine for the 5.14+ kernels, so I'm assuming it's > > > > fine for earlier ones too.) > > > > > > No, I don't think it will cause any problem. > > > > > > > > Just to be clear, the other patch that fixes the problem without > > > > > userspace visible changes is this: > > > > > https://lore.kernel.org/lkml/20210413160151.3301-1-rodrigo@xxxxxxxxxx/ > > > > > > > > I'd prefer to use the now-in-next fix if we can. Is it possible to build > > > > a test case that triggers the race so we can have some certainty that > > > > any fix in -stable covers it appropriately? > > > > > > I've verified that Sargun's patch also solves the problem in mainline. > > > I have now also verified that it applies cleany and fixes the issue > > > for linux-stable/5.10.y and linux-stable/5.12.y too (without the patch > > > I see the problem, with the patch I don't see it). 5.11 is already > > > EOL, so I didn't try it (probably will work as well). > > > > Oh, btw, may I add a Tested-by: from you for this fix? > > Oh, right! Yes. Here it goes so it's simpler to add :) > > Tested-by: Rodrigo Campos <rodrigo@xxxxxxxxxx> Thanks; this is in v5.13-rc4 now: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ddc473916955f7710d1eb17c1273d91c8622a9fe -- Kees Cook