dyingjiecai created KAFKA-19569:
-----------------------------------

             Summary: Potential Long.MAX_VALUE overflow in 
sessionExpirationTimeNanos calculation in SaslServerAuthenticator 
                 Key: KAFKA-19569
                 URL: https://issues.apache.org/jira/browse/KAFKA-19569
             Project: Kafka
          Issue Type: Bug
          Components: security
    Affects Versions: 4.0.0, 3.9.1
            Reporter: dyingjiecai
            Assignee: dyingjiecai
         Attachments: image-2025-08-01-10-12-04-784.png

There is a potential risk of Long.MAX_VALUE overflow in the 
sessionExpirationTimeNanos calculation within the SaslServerAuthenticator class.
Location:
 !image-2025-08-01-10-12-04-784.png! 
The calculation sessionExpirationTimeNanos = authenticationEndNanos + 1000 * 
1000 * retvalSessionLifetimeMs can potentially overflow when:
retvalSessionLifetimeMs is very large 
authenticationEndNanos is already a large value
The multiplication 1000 * 1000 * retvalSessionLifetimeMs exceeds Long.MAX_VALUE 
- authenticationEndNanos



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

Reply via email to