You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LeveldbConfigurationStore.deserLogMutations reads the scheduler configuration mutation log back from the LevelDB store with a raw ObjectInputStream.readObject(). Anyone who can write the store directory (yarn.scheduler.configuration.leveldb-store.path) can replace the serialized LinkedList<LogMutation> with a gadget payload, and the RM will instantiate arbitrary Serializable classes off the classpath on the next load/recovery.
The sibling ZKConfigurationStore already decodes the same LinkedList<LogMutation> through commons-io ValidatingObjectInputStream with an explicit class allowlist; the LevelDB store was left on the unrestricted path. This change applies the same allowlist (LinkedList, LogMutation, HashMap, String) inside the decode helper so the restriction lives next to the read rather than relying on the store being trusted.
How was this patch tested?
Round-tripped a real LinkedList<LogMutation> (a HashMap of updates plus a user string) through the patched helper - it deserializes unchanged. A serialized object of a class outside the allowlist is now rejected with InvalidClassException ("Class name not accepted") instead of being constructed. Built hadoop-yarn-server-resourcemanager with the change.
For code changes:
Does the title or this PR starts with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')?
Object storage: have the integration tests been executed and the endpoint declared according to the connector-specific documentation?
If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
If applicable, have you updated the LICENSE, LICENSE-binary, NOTICE-binary files?
AI Tooling
If an AI tool was used:
The PR includes the phrase "Contains content generated by "
where is the name of the AI tool used.
Rebased onto current trunk to retrigger CI. The previous Jenkins run hung in an unrelated RM test after TestLeveldbConfigurationStore passed 10/10, and the Actions build check needed the branch off a newer base.
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
45m 50s
trunk passed
+1 💚
compile
1m 25s
trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
compile
1m 27s
trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
checkstyle
1m 18s
trunk passed
+1 💚
mvnsite
1m 28s
trunk passed
+1 💚
javadoc
1m 12s
trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javadoc
1m 11s
trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
spotbugs
2m 36s
trunk passed
+1 💚
shadedclient
31m 21s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
0m 59s
the patch passed
+1 💚
compile
0m 56s
the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javac
0m 56s
the patch passed
+1 💚
compile
0m 56s
the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
javac
0m 56s
the patch passed
+1 💚
blanks
0m 0s
The patch has no blanks issues.
+1 💚
checkstyle
0m 51s
the patch passed
+1 💚
mvnsite
1m 2s
the patch passed
+1 💚
javadoc
0m 47s
the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javadoc
0m 47s
the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
spotbugs
2m 25s
the patch passed
+1 💚
shadedclient
30m 6s
patch has no errors when building and testing our client artifacts.
_ Other Tests _
+1 💚
unit
110m 20s
hadoop-yarn-server-resourcemanager in the patch passed.
The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ trunk Compile Tests _
+1 💚
mvninstall
43m 0s
trunk passed
+1 💚
compile
1m 26s
trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
compile
1m 29s
trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
checkstyle
1m 20s
trunk passed
+1 💚
mvnsite
1m 32s
trunk passed
+1 💚
javadoc
1m 14s
trunk passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javadoc
1m 12s
trunk passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
spotbugs
2m 38s
trunk passed
+1 💚
shadedclient
31m 26s
branch has no errors when building and testing our client artifacts.
_ Patch Compile Tests _
+1 💚
mvninstall
0m 59s
the patch passed
+1 💚
compile
0m 55s
the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javac
0m 55s
the patch passed
+1 💚
compile
1m 0s
the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
javac
1m 0s
the patch passed
+1 💚
blanks
0m 0s
The patch has no blanks issues.
+1 💚
checkstyle
0m 52s
the patch passed
+1 💚
mvnsite
1m 7s
the patch passed
+1 💚
javadoc
0m 49s
the patch passed with JDK Ubuntu-21.0.11+10-1-24.04.2-Ubuntu
+1 💚
javadoc
0m 46s
the patch passed with JDK Ubuntu-17.0.19+10-1-24.04.2-Ubuntu
+1 💚
spotbugs
2m 22s
the patch passed
+1 💚
shadedclient
30m 2s
patch has no errors when building and testing our client artifacts.
The -1 in the latest Yetus run is TestLeafQueue#testMaxApplicationsWithNodeLabels erroring inside Mockito spy stubbing (WrongTypeOfReturnValue on getNumAsyncSchedulerThreads), which is a stubbing race on the CapacityScheduler spy, not this patch; the change only touches deserialization in LeveldbConfigurationStore and TestLeafQueue has no reference to the configuration store. The previous Yetus run on the same branch passed the full resourcemanager suite with TestLeafQueue green. On test4tests, the manual verification steps are in the description under 'How was this patch tested'.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of PR
LeveldbConfigurationStore.deserLogMutationsreads the scheduler configuration mutation log back from the LevelDB store with a rawObjectInputStream.readObject(). Anyone who can write the store directory (yarn.scheduler.configuration.leveldb-store.path) can replace the serializedLinkedList<LogMutation>with a gadget payload, and the RM will instantiate arbitrary Serializable classes off the classpath on the next load/recovery.The sibling
ZKConfigurationStorealready decodes the sameLinkedList<LogMutation>through commons-ioValidatingObjectInputStreamwith an explicit class allowlist; the LevelDB store was left on the unrestricted path. This change applies the same allowlist (LinkedList,LogMutation,HashMap,String) inside the decode helper so the restriction lives next to the read rather than relying on the store being trusted.How was this patch tested?
Round-tripped a real
LinkedList<LogMutation>(aHashMapof updates plus a user string) through the patched helper - it deserializes unchanged. A serialized object of a class outside the allowlist is now rejected withInvalidClassException ("Class name not accepted")instead of being constructed. Builthadoop-yarn-server-resourcemanagerwith the change.For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
If an AI tool was used:
where is the name of the AI tool used.
https://www.apache.org/legal/generative-tooling.html