You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "Donny9 (via GitHub)" <gi...@apache.org> on 2024/04/22 06:29:05 UTC

[PR] drivers/misc/rwbuffer: fix rwbuffer overflow issue [nuttx]

Donny9 opened a new pull request, #12202:
URL: https://github.com/apache/nuttx/pull/12202

   
   
   ## Summary
   issue: https://github.com/apache/nuttx/pull/12188
   in rwb_wrflush():
   memmove(rwb->wrbuffer + padblocks * rwb->blocksize, rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize);
   
   when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
   
   fix:
   Let us ensure that the wrblockstart in rwbuffer must be aligned according to wralignblocks after writing, so there is no need to perform memmove when flushing
   ## Impact
   fix rwbuffer overflow
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] drivers/misc/rwbuffer: fix rwbuffer overflow issue [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #12202:
URL: https://github.com/apache/nuttx/pull/12202


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] drivers/misc/rwbuffer: fix rwbuffer overflow issue [nuttx]

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12202:
URL: https://github.com/apache/nuttx/pull/12202#issuecomment-2068745917

   @ChenChuangForLinux could you verifiy this patch fix your problem too?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] drivers/misc/rwbuffer: fix rwbuffer overflow issue [nuttx]

Posted by "ChenChuangForLinux (via GitHub)" <gi...@apache.org>.
ChenChuangForLinux commented on PR #12202:
URL: https://github.com/apache/nuttx/pull/12202#issuecomment-2069143499

   > @ChenChuangForLinux could you verifiy this patch fix your problem too?
   
   Yes, I've seen the change and it is better than my patch.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org