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

http: fix nul deref on memcap reached #11098

Closed

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/7029

Describe changes:

  • http: fix nul deref on memcap reached

HttpRangeOpenFileAux may return NULL in different cases, including
when memcap is reached.
But is only caller did not check it before calling HttpRangeAppendData
which would dereference the NULL value.

Ticket: 7029
@catenacyber
Copy link
Contributor Author

This is a shame that this was not found by any static code analysis tool.
HttpRangeOpenFileAux has several return NULL and its only caller uses it without checks to call HttpRangeAppendData which dereferences it without checks neither...

Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 84.10%. Comparing base (b728916) to head (ff64150).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11098      +/-   ##
==========================================
+ Coverage   84.08%   84.10%   +0.01%     
==========================================
  Files         925      925              
  Lines      250562   250563       +1     
==========================================
+ Hits       210687   210725      +38     
+ Misses      39875    39838      -37     
Flag Coverage Δ
fuzzcorpus 64.20% <66.66%> (+<0.01%) ⬆️
livemode 19.57% <0.00%> (-0.01%) ⬇️
pcap 46.47% <66.66%> (+0.03%) ⬆️
suricata-verify 62.81% <66.66%> (+0.02%) ⬆️
unittests 62.22% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 20663

@Nkwongere123
Copy link

@victorjulien
Copy link
Member

Merged in #11112, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants