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-11-19 16:56:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/clojure (Old) and /work/SRC/openSUSE:Factory/.clojure.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "clojure" Thu Nov 19 16:56:04 2026 rev:34 rq:1398597 version:1.12.7 Changes: -------- --- /work/SRC/openSUSE:Factory/clojure/clojure.changes 2026-09-08 16:55:36.194682314 +0200 +++ /work/SRC/openSUSE:Factory/.clojure.new.1251/clojure.changes 2026-11-19 16:57:10.057003325 +0100 @@ -1,0 +2,7 @@ +Thu Nov 19 08:03:26 UTC 2026 - Michael Vetter <[email protected]> + +- Update to 1.12.7: + * CLJ-2993 - AFunction can be used to craft a serialized object that runs + x arbitrary code on deserialization (GHSA-x4c4-68gp-vrhc) + +------------------------------------------------------------------- Old: ---- clojure-1.12.6.tar.gz New: ---- clojure-1.12.7.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ clojure.spec ++++++ --- /var/tmp/diff_new_pack.EZYSe2/_old 2026-11-19 16:57:11.104047707 +0100 +++ /var/tmp/diff_new_pack.EZYSe2/_new 2026-11-19 16:57:11.105047749 +0100 @@ -25,7 +25,7 @@ %define group clojure %define base_name clojure Name: %{base_name}%{name_suffix} -Version: 1.12.6 +Version: 1.12.7 Release: 0 Summary: Clojure core environment and runtime library License: EPL-1.0 ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.EZYSe2/_old 2026-11-19 16:57:11.164050250 +0100 +++ /var/tmp/diff_new_pack.EZYSe2/_new 2026-11-19 16:57:11.167050377 +0100 @@ -1,6 +1,6 @@ -mtime: 1788422880 -commit: 2b20e95a87a2840eaa17e01d272926bbaabde68b890d2b308d614ae54436428e +mtime: 1795075562 +commit: aa4992cff48d5980ca13bc06e0f27835e3b91156d7e422b48480778970b2ff7f url: https://src.opensuse.org/clojure/clojure -revision: 2b20e95a87a2840eaa17e01d272926bbaabde68b890d2b308d614ae54436428e +revision: aa4992cff48d5980ca13bc06e0f27835e3b91156d7e422b48480778970b2ff7f 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-11-19 09:06:02.000000000 +0100 @@ -0,0 +1 @@ +.osc ++++++ clojure-1.12.6.tar.gz -> clojure-1.12.7.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.6/changes.md new/clojure-clojure-1.12.7/changes.md --- old/clojure-clojure-1.12.6/changes.md 2026-09-02 20:14:22.000000000 +0200 +++ new/clojure-clojure-1.12.7/changes.md 2026-11-18 22:47:06.000000000 +0100 @@ -1,5 +1,15 @@ <!-- -*- mode: markdown ; mode: visual-line ; coding: utf-8 -*- --> +# 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). + +Reading serialized Java data from untrusted streams is inherently unsafe and Clojure function classes could be used in such an attack (in combination with standard JDK classes). + +As of Clojure 1.12.7, Clojure functions will throw on serialization and deserialization by default. The system property `-Dclojure.serializable.fns=true` can be set to allow these operations in a context you know is safe. + +* [CLJ-2993](https://clojure.atlassian.net/browse/CLJ-2993) - AFunction can be used to craft a serialized object that runs arbitrary code on deserialization + # Changes to Clojure in Version 1.12.6 * [CLJ-2794](https://clojure.atlassian.net/browse/CLJ-2794) - gen-class - incorrectly treats interface default methods as abstract, throwing when the var delegate is unbound diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.6/pom.xml new/clojure-clojure-1.12.7/pom.xml --- old/clojure-clojure-1.12.6/pom.xml 2026-09-02 20:14:22.000000000 +0200 +++ new/clojure-clojure-1.12.7/pom.xml 2026-11-18 22:47:06.000000000 +0100 @@ -5,7 +5,7 @@ <artifactId>clojure</artifactId> <name>clojure</name> <packaging>jar</packaging> - <version>1.12.6</version> + <version>1.12.7</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.6</tag> + <tag>clojure-1.12.7</tag> </scm> <properties> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.6/src/jvm/clojure/lang/AFunction.java new/clojure-clojure-1.12.7/src/jvm/clojure/lang/AFunction.java --- old/clojure-clojure-1.12.6/src/jvm/clojure/lang/AFunction.java 2026-09-02 20:14:22.000000000 +0200 +++ new/clojure-clojure-1.12.7/src/jvm/clojure/lang/AFunction.java 2026-11-18 22:47:06.000000000 +0100 @@ -12,11 +12,12 @@ package clojure.lang; -import java.io.Serializable; +import java.io.*; import java.util.Comparator; 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; @@ -62,4 +63,24 @@ Number n = (Number) o; return n.intValue(); } + +private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { + if(SERIALIZATION_ALLOWED) + in.defaultReadObject(); + else + throw new NotSerializableException(); +} + +private void readObjectNoData() throws ObjectStreamException { + if(!SERIALIZATION_ALLOWED) + throw new NotSerializableException(); +} + +private void writeObject(ObjectOutputStream oos) throws IOException { + if(SERIALIZATION_ALLOWED) + oos.defaultWriteObject(); + else + throw new NotSerializableException(); +} + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/clojure-clojure-1.12.6/test/clojure/test_clojure/serialization.clj new/clojure-clojure-1.12.7/test/clojure/test_clojure/serialization.clj --- old/clojure-clojure-1.12.6/test/clojure/test_clojure/serialization.clj 2026-09-02 20:14:22.000000000 +0200 +++ new/clojure-clojure-1.12.7/test/clojure/test_clojure/serialization.clj 2026-11-18 22:47:06.000000000 +0100 @@ -160,15 +160,15 @@ ;; but it is unbound (is (not (.hasRoot v2)))))) -(deftest function-serialization +(deftest function-serialization-fails-by-default (let [capture 5] - (are [f] (= capture ((-> f serialize deserialize))) - (constantly 5) - (fn [] 5) - #(do 5) - (constantly capture) - (fn [] capture) - #(do capture)))) + (doseq [f [(constantly 5) + (fn [] 5) + #(do 5) + (constantly capture) + (fn [] capture) + #(do capture)]] + (is (thrown? java.io.IOException (-> f serialize deserialize)))))) (deftest check-unserializable-objects (are [t] (thrown? java.io.NotSerializableException (serialize t))
