-
Notifications
You must be signed in to change notification settings - Fork 446
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
Allocation size too big/invalid memory access during extend_ref
/cram_add_to_ref
#1699
Comments
jkbonfield
added a commit
to jkbonfield/htslib
that referenced
this issue
Nov 16, 2023
If we have a few reads with 64-bit positions widly far apart, we could attempt to allocate huge sums of memory. The embedded reference isn't even helpful in this scenario, so we can limit this allocation to something more respectable. Fixes samtools#1699
jkbonfield
added a commit
to jkbonfield/htslib
that referenced
this issue
Nov 16, 2023
If we have a few reads with 64-bit positions widly far apart, we could attempt to allocate huge sums of memory. The embedded reference isn't even helpful in this scenario, so we can limit this allocation to something more respectable. Fixes samtools#1699
jkbonfield
added a commit
to jkbonfield/htslib
that referenced
this issue
Nov 16, 2023
If we have a few reads with 64-bit positions widly far apart, we could attempt to allocate huge sums of memory. The embedded reference isn't even helpful in this scenario, so we can limit this allocation to something more respectable. Fixes samtools#1699
jkbonfield
added a commit
to jkbonfield/htslib
that referenced
this issue
Nov 17, 2023
If we have a few reads with 64-bit positions widly far apart, we could attempt to allocate huge sums of memory. The embedded reference isn't even helpful in this scenario, so we can limit this allocation to something more respectable. Fixes samtools#1699
jkbonfield
added a commit
to jkbonfield/htslib
that referenced
this issue
Nov 17, 2023
If we have a few reads with 64-bit positions widly far apart, we could attempt to allocate huge sums of memory. The embedded reference isn't even helpful in this scenario, so we can limit this allocation to something more respectable. Fixes samtools#1699
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Allocation size too big during
extend_ref
during parsing of a crafted SAM/FASTA file pair. If this error is ignored, it leads to an invalid memory access duringcram_add_to_ref
.Environment
Built using LLVM 14 with ASAN on Ubuntu 22.04
How to reproduce
Build with ASAN on latest commit like so:
Within the samtools folder, get poc file and reproduce with:
Which on my setup outputs:
If I allow asan to ignore this error by running:
I get:
The text was updated successfully, but these errors were encountered: