[
https://issues.apache.org/jira/browse/ARTEMIS-4739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram updated ARTEMIS-4739:
------------------------------------
Description: The handle tis, which is an object of type
InflaterInputStream([line 233
|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]),
is created in the code and used to read data from contents([line
231|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]).
However, if the messageCompressed condition is true, then an
InflaterInputStream object will be created based on tis, and tis will be
overwritten with a new InflaterInputStream object. The problem occurs on [line
237|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]
because only the DataInputStream tdataIn is closed, but tis is not closed
explicitly. This may result in resource leakage and unavailability of resources
associated with the InflaterInputStream. (was: The handle tis, which is an
object of type InflaterInputStream([line 233
|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]),
is created in the code and used to read data from contents([line
231|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]).
However, if the messageCompressed condition is true, then an
InflaterInputStream object will be created based on tis, and tis will be
overwritten with a new InflaterInputStream object. The problem occurs on [line
237|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]
because only the DataInputStream tdataIn is closed, but tis is not closed
explicitly. This may result in resource leakage and unavailability of resources
associated with the InflaterInputStream.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author Alexey Galkin.)
> HANDLE LEAK in OpenWireMessageConverter.java
> --------------------------------------------
>
> Key: ARTEMIS-4739
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4739
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Galkin Alexey
> Priority: Major
>
> The handle tis, which is an object of type InflaterInputStream([line 233
> |https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]),
> is created in the code and used to read data from contents([line
> 231|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]).
> However, if the messageCompressed condition is true, then an
> InflaterInputStream object will be created based on tis, and tis will be
> overwritten with a new InflaterInputStream object. The problem occurs on
> [line
> 237|https://github.com/apache/activemq-artemis/blob/main/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireMessageConverter.java]
> because only the DataInputStream tdataIn is closed, but tis is not closed
> explicitly. This may result in resource leakage and unavailability of
> resources associated with the InflaterInputStream.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact