You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Alex (Jira)" <ji...@apache.org> on 2024/10/16 10:56:00 UTC

[jira] [Updated] (ARTEMIS-5114) deref after NULL

     [ https://issues.apache.org/jira/browse/ARTEMIS-5114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex updated ARTEMIS-5114:
--------------------------
    Description: 
The flushConfirmations() method does not check for connection == null. After calling the logger, the doWrite() method is called, which uses variables necessary for checking for null, such as confirmed and connection. If the confirmed value is checked in replayCommands(), then there is no check for connection, which will result in a NullPointerException. It is necessary to add validation either in the doWrite() method itself, or before each use of it.
[https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L749-L764]

also ask you to check this place: 
[https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L696-L707]

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A.Rudyuk.

  was:
The flushConfirmations() method does not check for connection == null. After calling the logger, the doWrite() method is called, which uses variables necessary for checking for null, such as confirmed and connection. If the confirmed value is checked in replayCommands(), then there is no check for connection, which will result in a NullPointerException. It is necessary to add validation either in the doWrite() method itself, or before each use of it.
[https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L749-L764]


also ask you to check this place: 
[https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L696-L707]


> deref after NULL
> ----------------
>
>                 Key: ARTEMIS-5114
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5114
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>            Reporter: Alex
>            Priority: Major
>
> The flushConfirmations() method does not check for connection == null. After calling the logger, the doWrite() method is called, which uses variables necessary for checking for null, such as confirmed and connection. If the confirmed value is checked in replayCommands(), then there is no check for connection, which will result in a NullPointerException. It is necessary to add validation either in the doWrite() method itself, or before each use of it.
> [https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L749-L764]
> also ask you to check this place: 
> [https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L696-L707]
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author A.Rudyuk.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact