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

Fix possible heap overflow in cram_encode_aux() on bad RG:Z tags #1737

Merged
merged 1 commit into from
Feb 2, 2024

Commits on Feb 2, 2024

  1. Fix possible heap overflow in cram_encode_aux() on bad RG:Z tags

    RG:Z tags without a proper NUL termination could lead to use of
    invalid data, or a heap overflow when the tag is passed to
    sam_hrecs_find_rg(), or hts_log_warning() if the former returns
    NULL.  Fix by moving the line that skips to the end of the aux
    tag and then checking that it was terminated correctly, failing
    if it was not.
    
    Similar checks are also added for MD:Z and generic Z- or H- type
    tags, to prevent generation of unreadable CRAM files.
    
    Credit to OSS-Fuzz
    Fixes oss-fuzz 66369
    daviesrob committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    e62d7ce View commit details
    Browse the repository at this point in the history