Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common/buffer: fix stack corruption in rebuild_aligned_size_and_memory() #42112

Merged
merged 1 commit into from Jul 9, 2021

Commits on Jul 9, 2021

  1. common/buffer: fix SIGABRT in rebuild_aligned_size_and_memory

    There is such a bl, which needs to satisfy two conditions:
    1)all ptrs' length sum except last ptr is aligned with 4K;
    2)the length of last ptr is 0.
    This bl will cause stack corruption when calling
    bufferlist::rebuild_aligned_size_and_memory().
    
    Deal with this special scenario in rebuild_aligned_size_and_memory() to
    solve the bug. And added a specialtest-case to reproduce this scenario.
    
    Fixes: https://tracker.ceph.com/issues/51419
    
    Signed-off-by: Yin Congmin <congmin.yin@intel.com>
    CongMinYin committed Jul 9, 2021
    Copy the full SHA
    05a49ae View commit details
    Browse the repository at this point in the history