rob05c opened a new issue #5125:
URL: https://github.com/apache/trafficcontrol/issues/5125


   Traffic Monitor is accessing `ReqInf.RemoteAddr` without checking for `nil` 
here:
   
https://github.com/apache/trafficcontrol/blob/2609e6fc59d98ae1985f0424f28956c6970b585d/traffic_monitor/towrap/towrap.go#L346
   
https://github.com/apache/trafficcontrol/blob/2609e6fc59d98ae1985f0424f28956c6970b585d/traffic_monitor/towrap/towrap.go#L355
   
   The `traffic_ops/*client*` returned `ReqInf.RemoteAddr` is guaranteed 
non-nil if `err==nil`, but if `err != nil`, it may be nil, depending how far 
the client got before it errored. It must be checked for nil before accessing. 
   
   This causes panics and applications crashes when certain types of errors 
happen.
   
   ## I'm submitting a ...
   -  bug report
   
   ## Traffic Control components affected ...
   -  Traffic Monitor
   
   ## Current behavior:
   Traffic Monitor crashes on certain Traffic Ops request errors.
   
   ## Expected behavior:
   Traffic Monitor does not crash.
   
   ## Minimal reproduction of the problem with instructions:
   Induce particular types of Traffic Ops connection errors. This was observed 
after downgrading a Traffic Ops from 4.1 to 3.0. But that may or may not be 
consistently reproducible, and is certainly not the only case which will cause 
a crash.
   
   ## Anything else:


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to