Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate SidCount mismatch #29

Open
michael-o opened this issue Oct 11, 2024 · 0 comments
Open

Investigate SidCount mismatch #29

michael-o opened this issue Oct 11, 2024 · 0 comments
Assignees

Comments

@michael-o
Copy link
Owner

michael-o commented Oct 11, 2024

Consider the following exception:

2024-08-08T14:31:24.380 SCHWERWIEGEND [https-openssl-apr-8444-exec-6780] org.apache.catalina.core.StandardHostValve.invoke Exception Processing [/app]
    java.lang.IllegalArgumentException: SidCount is 0, but actual SidCount is 4
        at net.sf.michaelo.tomcat.pac.KerbValidationInfo.<init>(KerbValidationInfo.java:233)
        at net.sf.michaelo.tomcat.pac.Pac.<init>(Pac.java:147)
        at net.sf.michaelo.tomcat.realm.PacDataActiveDirectoryRealm.getPrincipal(PacDataActiveDirectoryRealm.java:157)
        at org.apache.catalina.realm.RealmBase.authenticate(RealmBase.java:495)
        at net.sf.michaelo.tomcat.authenticator.SpnegoAuthenticator.doAuthenticate(SpnegoAuthenticator.java:158)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)

In theory, this can only happen when ExtraSids pointer is not null, but SidCount is zero. Does this make sense? Do we need to change: if (extraSidsPointer != 0L) to if (extraSidsPointer != 0L && sidCount != 0L)?

This makes only sense that the ExtraSids set is empty and the actual SidCount isn't set in the buffer, thus the next unit32 is stolen from ResourceGroupDomainSid.

@michael-o michael-o self-assigned this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant