[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49209: coreutils: stack out-of-bounds write in tail --follow
From: |
Paul Eggert |
Subject: |
bug#49209: coreutils: stack out-of-bounds write in tail --follow |
Date: |
Sat, 26 Jun 2021 18:47:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 6/24/21 8:50 AM, Paul Eggert wrote:
inotify_init can return 1025 even if called first thing, so we also need
to dup2 the result of early inotify_init down to 3 (or whatever), or at
least to check that it's less than 1024. Choosing 3 is a tricky
business, since it's not clear what fds the C library actually needs.
When looking into this I decided it was cleaner to fix coreutils by
using 'poll' instead of 'select', as Kamil suggested. I installed the
attached patches to do that. The last patch fixes the bug.
Thanks for reporting the problem.
0001-maint-while-1-while-true.patch
Description: Text Data
0002-tail-fix-abuse2-test-race.patch
Description: Text Data
0003-tail-use-poll-not-select.patch
Description: Text Data