Skip to content

MODCLUSTER-875: Fix the handling of bad advertisements, add tests - #995

Closed
jajik wants to merge 1 commit into
modcluster:mainfrom
jajik:tweak-advertisement
Closed

MODCLUSTER-875: Fix the handling of bad advertisements, add tests#995
jajik wants to merge 1 commit into
modcluster:mainfrom
jajik:tweak-advertisement

Conversation

@jajik

@jajik jajik commented Aug 21, 2026

Copy link
Copy Markdown
Member

@jajik
jajik requested a review from rhusar as a code owner August 21, 2026 14:16
@jajik jajik added bug java Pull requests that update Java code labels Aug 21, 2026

@rhusar rhusar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CVE description is not complete, there are other vectors but same result.

The actual failure mode in MODCLUSTER-875 isn't "NPE in verifyDigest" - it's any unchecked exception in AdvertiseListenerWorker.run() permanently kills the worker thread, because the loop only catches ClosedChannelException and IOException. Worse, listening is left at true, so isListening() keeps reporting healthy while advertisement handling is dead.

e.g.

  • Integer.parseInt(sline[1]) -> HTTP/1.1 abc OK\r\n → NumberFormatException → same problem
  • Utils.parseSocketAddress (Utils.java:40) -> X-Manager-Address: 127.0.0.1:notaport → NumberFormatException -> same problem

So, the fix is quite different from what is proposed here.

I ll take it from here and open a proper fix, thanks @jajik

}
}
} else {
log.tracef("Advertise message for server %s was discarded due to missing headers", server_name);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this would be always null here, so the server name in the. message is useless.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about this? What about a message with a Server header but a missing Date, Sequence, or Digest?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I should have said "could be".

@rhusar rhusar closed this Sep 2, 2026
@jajik

jajik commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

The CVE description is not complete, there are other vectors but same result.

That sounds like a different CVE to me. We cannot expect reports that cover everything, especially with multi-layered issues like this.

The actual failure mode in MODCLUSTER-875 isn't "NPE in verifyDigest" - it's any unchecked exception in AdvertiseListenerWorker.run() permanently kills the worker thread, because the loop only catches ClosedChannelException and IOException. Worse, listening is left at true, so isListening() keeps reporting healthy while advertisement handling is dead.

Yes and no. It's true that the exception handler should cover more of them, but the issue here was that an exception was thrown in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants