On 3/16/21 10:36 AM, Darrick J. Wong wrote: > On Tue, Mar 16, 2021 at 03:10:44PM +0100, Carlos Maiolino wrote: >> On Tue, Mar 16, 2021 at 08:45:20AM -0500, Eric Sandeen wrote: >>> On 3/16/21 4:04 AM, Carlos Maiolino wrote: >>>> xlog_recover_print_quotaoff() was using a static buffer to aggregate >>>> quota option strings to be printed at the end. The buffer size was >>>> miscalculated and when printing all 3 flags, a buffer overflow occurs >>>> crashing xfs_logprint, like: >>>> >>>> QOFF: cnt:1 total:1 a:0x560530ff3bb0 len:160 >>>> *** buffer overflow detected ***: terminated >>>> Aborted (core dumped) >>>> >>>> Fix this by removing the static buffer and using printf() directly to >>>> print each flag. >>> >>> Yeah, that makes sense. Not sure why it was using a static buffer, >>> unless I was missing something? >>> >>>> Also add a trailling space before each flag, so they >>> >>> "trailing space before?" :) I can fix that up on commit. >> >> Maybe I slipped into my words here... The current printed format, did something >> like this: >> >> type: USER QUOTAGROUP QUOTAPROJECT QUOTA >> >> I just added a space before each flag string, to print like this: >> >> type: USER QUOTA GROUP QUOTA PROJECT QUOTA > > Any reason we can't just shorten this to "type: USER GROUP PUOTA" ? oh yeah, that's a good idea, but: "USER GROUP PROJECT" -Eric