Re: [PATCH 4/4] file: Fix file descriptor leak in copy_fd_bitmaps()

From: aissur0002
Date: Tue Mar 29 2022 - 16:43:35 EST


> Btw, do you have a pointer to the syzbot report? I see the repro and
> the crashlog you attached, but it would be good to have that pointer
> to the syzbot original too.
>
> Or did you just do this by running syzkaller yourself and there is no
> external report?

Alexey V. Khoroshilov (<khoroshilov@xxxxxxxxx>) will soon answer about
the syzbot original, I suppose. Personally, I possess only Crashlog and
repro.c file which I ran on a local machine and I don't know whether
there is an external report.

As for the solution you proposed, I agree with it: definitely the problem
was caused by an incorrect alignment of max_fds. Frankly speaking, I
didn't know that
> sane_fdtable_size() really should never return a value that
> isn't BITS_PER_LONG aligned
because there is no explicit alignment of max_fds value in the code as
I can see.