Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package clojure for openSUSE:Factory checked in at 2026-12-03 13:58:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clojure (Old) and /work/SRC/openSUSE:Factory/.clojure.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clojure" Thu Dec 3 13:58:32 2026 rev:35 rq:1402638 version:1.12.8 Changes: -------- --- /work/SRC/openSUSE:Factory/clojure/clojure.changes 2026-11-19 16:57:10.057003325 +0100 +++ /work/SRC/openSUSE:Factory/.clojure.new.1340718/clojure.changes 2026-12-03 14:01:34.611087231 +0100 @@ -1,0 +2,18 @@ +Thu Dec 3 07:55:57 UTC 2026 - Michael Vetter <[email protected]> + +- Update to 1.12.8: + * This release replaces the change in Clojure 1.12.7 re the serialization + issue detailed in GHSA-x4c4-68gp-vrhc. + * Function serialization is always allowed + * Removes system property clojure.serializable.fns + * Adds system property clojure.deserialize.code with values true/false/unknown + * Adds dynamic var *deserialize-code*, initialized from system property to + true/false/:unknown, default=false + * In function deserialization: + + If var is true, allow deserialization to continue + + If var is false, throw IOException preventing deserialization + + If var is :unknown, throw RuntimeException to alert developer that a code + path is not explicitly protecting deserialization, for diagnostic use + * CLJ-2998 - Code deserialization control + +------------------------------------------------------------------- Old: ---- clojure-1.12.7.tar.gz New: ---- clojure-1.12.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clojure.spec ++++++ --- /var/tmp/diff_new_pack.GazFyc/_old 2026-12-03 14:01:35.618129908 +0100 +++ /var/tmp/diff_new_pack.GazFyc/_new 2026-12-03 14:01:35.620129993 +0100 @@ -25,7 +25,7 @@ %define group clojure %define base_name clojure Name: %{base_name}%{name_suffix} -Version: 1.12.7 +Version: 1.12.8 Release: 0 Summary: Clojure core environment and runtime library License: EPL-1.0 ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.GazFyc/_old 2026-12-03 14:01:35.677132409 +0100 +++ /var/tmp/diff_new_pack.GazFyc/_new 2026-12-03 14:01:35.684132705 +0100 @@ -1,6 +1,6 @@ -mtime: 1795075562 -commit: aa4992cff48d5980ca13bc06e0f27835e3b91156d7e422b48480778970b2ff7f +mtime: 1796284854 +commit: 425f1ff18ea8d93ff09397e5447fa69e7a949e8662fcfc8869d9dccc86498d9f url: https://src.opensuse.org/clojure/clojure -revision: aa4992cff48d5980ca13bc06e0f27835e3b91156d7e422b48480778970b2ff7f +revision: 425f1ff18ea8d93ff09397e5447fa69e7a949e8662fcfc8869d9dccc86498d9f projectscmsync: https://src.opensuse.org/clojure/_ObsPrj.git ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-12-03 09:00:54.000000000 +0100 @@ -0,0 +1 @@ +.osc ++++++ clojure-1.12.7.tar.gz -> clojure-1.12.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/changes.md new/clojure-clojure-1.12.8/changes.md --- old/clojure-clojure-1.12.7/changes.md 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/changes.md 2026-12-02 19:39:09.000000000 +0100 @@ -1,5 +1,22 @@ <!-- -*- mode: markdown ; mode: visual-line ; coding: utf-8 -*- --> +# Changes to Clojure in Version 1.12.8 + +Security note: This release replaces the fix in Clojure 1.12.7 for [GHSA-x4c4-68gp-vrhc](https://github.com/clojure/clojure/security/advisories/GHSA-x4c4-68gp-vrhc): + +* Function serialization is always allowed +* System property `clojure.serializable.fns` has been removed +* New system property `clojure.deserialize.code` has been added with values true/false/unknown +* New dynamic var `*deserialize-code*`, initialized from system property to true/false/:unknown, default=false +* In function deserialization: + * If var is true, allow deserialization to continue + * If var is false, throw IOException preventing deserialization + * If var is :unknown, throw RuntimeException to alert developer that a code path is not explicitly protecting deserialization, for diagnostic use + +See: + +* [CLJ-2998](https://clojure.atlassian.net/browse/CLJ-2998) - Code deserialization control + # Changes to Clojure in Version 1.12.7 Security note: This release addresses the serialization issue detailed in [GHSA-x4c4-68gp-vrhc](https://github.com/clojure/clojure/security/advisories/GHSA-x4c4-68gp-vrhc). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/pom.xml new/clojure-clojure-1.12.8/pom.xml --- old/clojure-clojure-1.12.7/pom.xml 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/pom.xml 2026-12-02 19:39:09.000000000 +0100 @@ -5,7 +5,7 @@ <artifactId>clojure</artifactId> <name>clojure</name> <packaging>jar</packaging> - <version>1.12.7</version> + <version>1.12.8</version> <url>http://clojure.org/</url> <description>Clojure core environment and runtime library.</description> @@ -30,7 +30,7 @@ <connection>scm:git:[email protected]:clojure/clojure.git</connection> <developerConnection>scm:git:[email protected]:clojure/clojure.git</developerConnection> <url>[email protected]:clojure/clojure.git</url> - <tag>clojure-1.12.7</tag> + <tag>clojure-1.12.8</tag> </scm> <properties> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/src/clj/clojure/core.clj new/clojure-clojure-1.12.8/src/clj/clojure/core.clj --- old/clojure-clojure-1.12.7/src/clj/clojure/core.clj 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/src/clj/clojure/core.clj 2026-12-02 19:39:09.000000000 +0100 @@ -6605,6 +6605,25 @@ " {:added "1.0"}) +(add-doc-and-meta *deserialize-code* + "Defaults to false or the value of the Java system property + 'clojure.deserialize.code' (true / false / unknown). + + Java deserialization of code objects may cause arbitrary code to + execute. This should never be done with untrusted sources. + + Code deserialization is permitted only when *deserialize-code* is + true. When bound to false, code deserialization will throw + IOException (NotSerializableException) and no code can execute. + + The system property can also be set to 'unknown' via + -Dclojure.deserialize.code=unknown, in which case the default binding + is :unknown and all code deserialization will throw RuntimeException in + all contexts where *deserialize-code* has not been explicitly bound to + true or false. This setting can be a useful diagnostic tool to ensure that + all of your deserialization occurs in considered contexts." + {:added "1.12.8"}) + (add-doc-and-meta *assert* "When set to logical false, 'assert' will omit assertion checks in compiled code. Defaults to true." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/src/jvm/clojure/lang/AFunction.java new/clojure-clojure-1.12.8/src/jvm/clojure/lang/AFunction.java --- old/clojure-clojure-1.12.7/src/jvm/clojure/lang/AFunction.java 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/src/jvm/clojure/lang/AFunction.java 2026-12-02 19:39:09.000000000 +0100 @@ -17,7 +17,6 @@ public abstract class AFunction extends AFn implements IObj, Comparator, Fn, Serializable { -private static final boolean SERIALIZATION_ALLOWED = Boolean.getBoolean("clojure.serializable.fns"); private static final long serialVersionUID = 4469383498184457675L; public volatile MethodImplCache __methodImplCache; @@ -64,23 +63,22 @@ return n.intValue(); } -private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { - if(SERIALIZATION_ALLOWED) - in.defaultReadObject(); - else - throw new NotSerializableException(); +private static void checkDeserializeCode() throws NotSerializableException { + Object deserCode = RT.DESER_CODE.deref(); + if(deserCode == Boolean.TRUE) + return; + if(deserCode == RT.UNKNOWN) + throw Util.runtimeException("Code deserialization not allowed - *deserialize-code* bound to :unknown"); + throw new NotSerializableException(); } -private void readObjectNoData() throws ObjectStreamException { - if(!SERIALIZATION_ALLOWED) - throw new NotSerializableException(); +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + checkDeserializeCode(); + in.defaultReadObject(); } -private void writeObject(ObjectOutputStream oos) throws IOException { - if(SERIALIZATION_ALLOWED) - oos.defaultWriteObject(); - else - throw new NotSerializableException(); +private void readObjectNoData() throws ObjectStreamException { + checkDeserializeCode(); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/src/jvm/clojure/lang/LispReader.java new/clojure-clojure-1.12.8/src/jvm/clojure/lang/LispReader.java --- old/clojure-clojure-1.12.7/src/jvm/clojure/lang/LispReader.java 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/src/jvm/clojure/lang/LispReader.java 2026-12-02 19:39:09.000000000 +0100 @@ -57,7 +57,7 @@ static Symbol DEREF = Symbol.intern("clojure.core", "deref"); static Symbol READ_COND = Symbol.intern("clojure.core", "read-cond"); static Symbol READ_COND_SPLICING = Symbol.intern("clojure.core", "read-cond-splicing"); -static Keyword UNKNOWN = Keyword.intern(null, "unknown"); +static Keyword UNKNOWN = RT.UNKNOWN; //static Symbol DEREF_BANG = Symbol.intern("clojure.core", "deref!"); static IFn[] macros = new IFn[256]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/src/jvm/clojure/lang/RT.java new/clojure-clojure-1.12.8/src/jvm/clojure/lang/RT.java --- old/clojure-clojure-1.12.7/src/jvm/clojure/lang/RT.java 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/src/jvm/clojure/lang/RT.java 2026-12-02 19:39:09.000000000 +0100 @@ -172,12 +172,13 @@ // single instance of UTF-8 Charset, so as to avoid catching UnsupportedCharsetExceptions everywhere static public Charset UTF8 = Charset.forName("UTF-8"); +final public static Keyword UNKNOWN = Keyword.intern(null, "unknown"); static Object readTrueFalseUnknown(String s){ if(s.equals("true")) return Boolean.TRUE; else if(s.equals("false")) return Boolean.FALSE; - return Keyword.intern(null, "unknown"); + return UNKNOWN; } static public final Object REQUIRE_LOCK = new Object(); @@ -197,6 +198,8 @@ final static public Var AGENT = Var.intern(CLOJURE_NS, Symbol.intern("*agent*"), null).setDynamic(); static Object readeval = readTrueFalseUnknown(System.getProperty("clojure.read.eval","true")); final static public Var READEVAL = Var.intern(CLOJURE_NS, Symbol.intern("*read-eval*"), readeval).setDynamic(); +final static Object deserCode = readTrueFalseUnknown(System.getProperty("clojure.deserialize.code","false")); +final static public Var DESER_CODE = Var.intern(CLOJURE_NS, Symbol.intern("*deserialize-code*"), deserCode).setDynamic(); final static public Var DATA_READERS = Var.intern(CLOJURE_NS, Symbol.intern("*data-readers*"), RT.map()).setDynamic(); final static public Var DEFAULT_DATA_READER_FN = Var.intern(CLOJURE_NS, Symbol.intern("*default-data-reader-fn*"), RT.map()).setDynamic(); final static public Var DEFAULT_DATA_READERS = Var.intern(CLOJURE_NS, Symbol.intern("default-data-readers"), RT.map()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.7/test/clojure/test_clojure/serialization.clj new/clojure-clojure-1.12.8/test/clojure/test_clojure/serialization.clj --- old/clojure-clojure-1.12.7/test/clojure/test_clojure/serialization.clj 2026-11-18 22:47:06.000000000 +0100 +++ new/clojure-clojure-1.12.8/test/clojure/test_clojure/serialization.clj 2026-12-02 19:39:09.000000000 +0100 @@ -160,7 +160,8 @@ ;; but it is unbound (is (not (.hasRoot v2)))))) -(deftest function-serialization-fails-by-default +(defn fn-serialization-helper + [expected] (let [capture 5] (doseq [f [(constantly 5) (fn [] 5) @@ -168,7 +169,18 @@ (constantly capture) (fn [] capture) #(do capture)]] - (is (thrown? java.io.IOException (-> f serialize deserialize)))))) + (is (= expected + (try (-> f serialize deserialize) + nil + (catch Throwable t (class t)))))))) + +(deftest function-serialization-fails-by-default + (binding [*deserialize-code* false] + (fn-serialization-helper java.io.NotSerializableException)) + (binding [*deserialize-code* true] + (fn-serialization-helper nil)) + (binding [*deserialize-code* :unknown] + (fn-serialization-helper RuntimeException))) (deftest check-unserializable-objects (are [t] (thrown? java.io.NotSerializableException (serialize t))
