Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Christian Schoenebeck
On Mittwoch, 16. Februar 2022 19:18:21 CET Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559e

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Vitaly Chikunov
On Thu, Feb 17, 2022 at 10:26:37AM +0100, Christian Schoenebeck wrote: > On Mittwoch, 16. Februar 2022 19:18:21 CET Vitaly Chikunov wrote: > > `struct dirent' returned from readdir(3) could be shorter (or longer) > > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > > into

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Greg Kurz
On Wed, 16 Feb 2022 21:18:21 +0300 Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559ebeed v

Re: [PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-17 Thread Christian Schoenebeck
On Mittwoch, 16. Februar 2022 19:18:21 CET Vitaly Chikunov wrote: > `struct dirent' returned from readdir(3) could be shorter (or longer) > than `sizeof(struct dirent)', thus memcpy of sizeof length will overread > into unallocated page causing SIGSEGV. Example stack trace: > > #0 0x559e

[PATCH v5] 9pfs: Fix segfault in do_readdir_many caused by struct dirent overread

2022-02-16 Thread Vitaly Chikunov
`struct dirent' returned from readdir(3) could be shorter (or longer) than `sizeof(struct dirent)', thus memcpy of sizeof length will overread into unallocated page causing SIGSEGV. Example stack trace: #0 0x559ebeed v9fs_co_readdir_many (/usr/bin/qemu-system-x86_64 + 0x497eed) #1 0x0