-
Bug
-
Resolution: Done
-
Major
-
8.0 Update 7
-
None
After UNDERTOW-2046, the following NPE could be seen in a less likely scenario if the source address returns no actual ip address:
java.lang.NullPointerException: Cannot invoke "java.net.InetAddress.getHostAddress()" because the return value of "java.net.InetSocketAddress.getAddress()" is null at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyHandler$ProxyAction.run(ProxyHandler.java:482) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:35) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.HttpServerExchange.dispatch(HttpServerExchange.java:874) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:345) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:319) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyConnectionPool.connectionReady(ProxyConnectionPool.java:353) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyConnectionPool.connect(ProxyConnectionPool.java:548) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.mod_cluster.Context.handleRequest(Context.java:179) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.mod_cluster.ModClusterProxyClient.getConnection(ModClusterProxyClient.java:124) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.run(ProxyHandler.java:339) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:35) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.Connectors.executeRootHandler(Connectors.java:412) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:265) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:162) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:100) at io.undertow.core@2.2.37.SP2-redhat-00001//io.undertow.server.protocol.http.HttpOpenListener.handleEvent(HttpOpenListener.java:57) at org.jboss.xnio@3.8.16.Final-redhat-00001//org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
A possible scenario could be with a ProxyPeerAddressHandler also in use and then if Undertow receives a hostname in the X-Forwarded-For. An unresolved host is then set on the source address for a later NPE.
- blocks
-
JBEAP-30535 [GSS](8.0.z) UNDERTOW-2576 - ProxyHandler can throw NullPointerException if the source address SocketAddress has no ip address
-
- Resolved
-
- is incorporated by
-
JBEAP-30596 (8.1.z) Upgrade Undertow from 2.3.18.Final to 2.3.19.SP1
-
- Pull Request Sent
-