IBM Support

IT26970: Issues with MQ Explorer and MQ Classes for Java when consuming an invalid message

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • IBM MQ Explorer and IBM MQ Classes for Java attempted to browse
    or consume a message with an invalid NameValueLength value which
    is contained in the RFH2 header. This results in the following
    issues:
    
    - IBM MQ Explorer application hangs when browsing the queue with
    the invalid message.
    
    - IBM MQ Classes for Java throws a  java.lang.OutOfMemoryError
    exception when receiving the invalid message, which causes the
    JVM to terminate.
    

Local fix

Problem summary

  • ****************************************************************
    USERS AFFECTED:
    The issue affects the users of:
    
    	- The IBM MQ Classes for Java
    	- IBM MQ Explorer
    
    who browse or consume a message with an invalid value of
    NameValueLength in the RFH2 header.
    
    
    Platforms affected:
    MultiPlatform
    
    ****************************************************************
    PROBLEM DESCRIPTION:
    When IBM MQ Explorer and the IBM MQ Classes for Java attempted
    to browse or consume a message with an invalid value for the
    NameValueLength field contained in the RFH2 header, the
    following issues would occur:
    
    - IBM MQ Explorer would hang when browsing the queue containing
    the invalid message.
    - The IBM MQ Classes for Java threw a java.lang.OutOfMemoryError
    exception when receiving the invalid message, which caused the
    JVM to terminate.
    
    This issue is caused by a logic error in the IBM MQ Header
    classes (used by both the IBM MQ Explorer and classes for Java).
    The IBM MQ Header classes would attempt to create a ByteBuffer
    with a size specified by the value of the NameValueLength field,
    which would be used to store the corresponding NameValueData.
    However, if the value of the NameValueLength field happened to
    be larger than the heap size of the JVM, the attempt to create
    the ByteBuffer would either result in an OutOfMemoryError or a
    hang.
    

Problem conclusion

  • The IBM MQ Header classes have been updated to throw an
    exception if they are processing a message where the
    NameValueLength field in an MQRFH2 header is greater than the
    total size of the message.
    
    The IBM MQ Explorer has been updated to catch this exception,
    and report reason code 2421 (MQRC_RFH_FORMAT_ERROR) when
    browsing or consuming such a message.
    
    The IBM MQ classes for Java have also been updated to wrap the
    exception in an MQException containing reason code 2421, and
    then throw it to the application that is browing or consuming
    the message.
    
    These changes prevent a hang or OutOfMemoryError from occurring.
    
    ---------------------------------------------------------------
    The fix is targeted for delivery in the following PTFs:
    
    Version    Maintenance Level
    v9.1 CD    9.1.2
    v9.1 LTS   9.1.0.2
    
    The latest available maintenance can be obtained from
    'WebSphere MQ Recommended Fixes'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006037
    
    If the maintenance level is not yet available information on
    its planned availability can be found in 'WebSphere MQ
    Planned Maintenance Release Dates'
    http://www-1.ibm.com/support/docview.wss?rs=171&uid=swg27006309
    ---------------------------------------------------------------
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT26970

  • Reported component name

    IBM MQ BASE M/P

  • Reported component ID

    5724H7261

  • Reported release

    902

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2018-11-14

  • Closed date

    2018-11-28

  • Last modified date

    2018-11-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    IBM MQ BASE M/P

  • Fixed component ID

    5724H7261

Applicable component levels

  • R902 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSYHRD","label":"IBM MQ"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
21 November 2021