View Issue Details

IDProjectCategoryView StatusLast Update
0005152unrealircdpublic2018-09-25 14:02
ReportershenlantingAssigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0005152: a possible deference of null pointer?
DescriptionHi all,
There is a possible deference of a null pointer found by Qihoo360 CodeSafe Team.
Details as bellow:

In file 'src/modules/chanmodes/censor.c', line 208, the pointer word is declared and assigned as NULL.

Only when the statement in 246 executed, pointer 'word' could be a value not NULL.

So, before deferencing it in line 251, it is better to add a check against NULL.
TagsQihoo360 CodeSafe Static Analysis
3rd party modules

Activities

syzop

2018-09-25 11:31

administrator   ~0020347

See 0005150. But also a specific advice for this one:
In UnrealIRCd we have two stages, first there the "config test" function is called and if that passes testing then the "config run" functions are called.
We have many checks in the "config test" code that verifies if certain blocks/variables exist. In the "config run" code such checks are then absent because we never make it to "config run". The bug thus never occurs, there is no issue.

Whether that is also true in this specific case I have not checked, but just wanted you to be aware of this ;)

syzop

2018-09-25 14:02

administrator   ~0020352

As for this specific bug:

As far as I can see this is properly handled by censor_config_test().
https://github.com/unrealircd/unrealircd/blob/unreal40/src/modules/chanmodes/censor.c#L185-L190
And if that fails then the censor_config_run is never executed.

If I'm wrong and you can provide me with for example a configuration file that makes UnrealIRCd crash with a certain badword block, then let me know and we'll get this fixed.

Issue History

Date Modified Username Field Change
2018-09-25 11:07 shenlanting New Issue
2018-09-25 11:07 shenlanting Tag Attached: Qihoo360 CodeSafe Static Analysis
2018-09-25 11:31 syzop Note Added: 0020347
2018-09-25 14:02 syzop Note Added: 0020352