heimdal icon indicating copy to clipboard operation
heimdal copied to clipboard

potential bug of null pointer dereference(3)

Open ash1852 opened this issue 4 years ago • 1 comments

would you help me to check if the following bug is true? thank you very much.

==============================================================================

step 1 : In file heimdal/lib/asn1/gen_template.c , function tlist_new line 292: Store the allocated memory to tl->name (lacking failure check, 81 out of 130 memory allocations checked failures)

step 2 : In file heimdal/lib/asn1/gen_template.c , function tlist_new line 294: Program reaches the return point, modifying the value tl->name to null, where tl is the return value

step 3 : In file heimdal/lib/asn1/gen_template.c , function generate_template_type line 1403: Function tlist_new modifies the value tl->name to null, where tl gets the return value

step 4 : In file heimdal/lib/asn1/gen_template.c , function generate_template_type line 1439: tl->name is passed to function fprintf as a variadic argument (tl->name can be null)

ash1852 avatar Sep 08 '21 07:09 ash1852

While this is a bug, it is not in a library in Heimdal but in the ASN.1 compiler in Heimdal. The ASN.1 compiler in Heimdal has various null-dereference issues, some of which can be triggered by invalid input modules. We do not consider null-dereference issues in the compiler itself to be a problem.

nicowilliams avatar Dec 06 '21 21:12 nicowilliams