squid icon indicating copy to clipboard operation
squid copied to clipboard

Fix Cache Digest nil and cbdata-invalid pointer dereferences

Open Shchelk opened this issue 2 years ago • 6 comments

The nil pointer dereference detected by Svace static analysis tool:

warn: NULL_AFTER_DEREF
Pointer 'fetch->pd' which was dereferenced at peer_digest.cc:702 is
compared to NULL value at peer_digest.cc:709.

Shchelk avatar Aug 11 '21 06:08 Shchelk

Can one of the admins verify this patch?

squid-prbot avatar Aug 11 '21 06:08 squid-prbot

@Shchelk, can you disclose the name of the static analysis tool that you used? It is not necessary, of course, but it would be nice to document it in the PR description (which will become a commit message body when this PR is merged by Anubis).

rousskov avatar Aug 11 '21 14:08 rousskov

@rousskov The tool is called 'Svace', it's commercial product of ISP RAN. You can use this telegram channel https://t.me/sdl_static to contact svace developers

Shchelk avatar Aug 13 '21 15:08 Shchelk

The tool is called 'Svace', it's commercial product of ISP RAN.

Thank you. I have updated the PR description to mention the tool name. The name appears to be unique enough to easily find more information about the tool if anybody needs it.

@Shchelk, just clarifying the current PR state: Please note that the ball is on your side to either address the XXXs I have added or decline the opportunity to do so. If you cannot address those XXXs in this PR, then we will decide whether to merge the PR as it is now (even though it leaves arguably similar bugs behind) or wait for another volunteer to fix those XXXs.

rousskov avatar Aug 14 '21 16:08 rousskov

@rousskov I apologize for answering for along time. Unfortunately, I haven't resources to work on this and i don't understand the code well. It's would be better if someone else fix this.

Shchelk avatar Aug 16 '21 13:08 Shchelk

@Shchelk, thank you for a clear answer and for identifying the primary bug! The Squid Project can take it from here...

@squid-cache/commiters, anybody willing to take over this PR and fix XXXs added in 752b9bd?

rousskov avatar Aug 16 '21 14:08 rousskov