Skip to contentSkip to conversation

package/fluidsynth: add patch for CVE-2025-56225

PATCH Applied Thomas Perale via buildroot 1 participant 2 messages Feb 24 – Feb 26

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/fluidsynth: add patch for CVE-2025-56225

Fixes the following vulnerability:

- CVE-2025-56225:
fluidsynth-2.4.6 and earlier versions is vulnerable to Null pointer dereference in fluid_synth_monopoly.c, that can be triggered when loading an invalid midi file.

For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2025-56225
- https://github.com/FluidSynth/fluidsynth/commit/45f2a79f4265dcc4f98cfbafdb10727fb1c0d411

---
 ...inter-dereference-during-legato-mode.patch | 25 +++++++++++++++++++
 package/fluidsynth/fluidsynth.mk              |  3 +++
 2 files changed, 28 insertions(+)
 create mode 100644 package/fluidsynth/0001-Fix-a-nullpointer-dereference-during-legato-mode.patch
package/fluidsynth/0001-Fix-a-nullpointer-dereference-during-legato-mode.patch new file +25 -0
new file mode 100644
index 0000000000..a155164bcf
@@ -0,0 +1,25 @@
+From 45f2a79f4265dcc4f98cfbafdb10727fb1c0d411 Mon Sep 17 00:00:00 2001
+From: "Tom M." <[email protected]>
+Date: Mon, 14 Jul 2025 18:13:38 +0200
+Subject: [PATCH] Fix a nullpointer dereference during legato mode (#1607)
+
+CVE: CVE-2025-56225
+Upstream: https://github.com/FluidSynth/fluidsynth/commit/45f2a79f4265dcc4f98cfbafdb10727fb1c0d411
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ src/synth/fluid_synth_monopoly.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/synth/fluid_synth_monopoly.c b/src/synth/fluid_synth_monopoly.c
+index d1de13196..6e6e2a906 100644
+--- a/src/synth/fluid_synth_monopoly.c
++++ b/src/synth/fluid_synth_monopoly.c
+@@ -410,7 +410,7 @@ int fluid_synth_noteoff_mono_LOCAL(fluid_synth_t *synth, int chan, int key)
+                 fluid_channel_breath_msb(channel))
+         {
+             /* legato playing detection */
+-            if(channel->mode  & FLUID_CHANNEL_LEGATO_PLAYING)
++            if (channel->mode & FLUID_CHANNEL_LEGATO_PLAYING && channel->preset != NULL)
+             {
+                 /* the list contains others notes */
+                 if(i_prev >= 0)
package/fluidsynth/fluidsynth.mk +3 -0
index 1c9139aa9f..bde3f416a7 100644
@@ -12,6 +12,9 @@ FLUIDSYNTH_CPE_ID_VENDOR = fluidsynth
 FLUIDSYNTH_INSTALL_STAGING = YES
 FLUIDSYNTH_DEPENDENCIES = libglib2
 
+# 0001-Fix-a-nullpointer-dereference-during-legato-mode.patch
+FLUIDSYNTH_IGNORE_CVES += CVE-2025-56225
+
 ifeq ($(BR2_PACKAGE_FLUIDSYNTH_ALSA_LIB),y)
 FLUIDSYNTH_CONF_OPTS += -Denable-alsa=1
 FLUIDSYNTH_DEPENDENCIES += alsa-lib
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

In reply of:

Quoted 7 lines

Fixes the following vulnerability:

- CVE-2025-56225:
fluidsynth-2.4.6 and earlier versions is vulnerable to Null pointer dereference in fluid_synth_monopoly.c, that can be triggered when loading an invalid midi file.

Quoted 5 lines

For more information, see:
- https://www.cve.org/CVERecord?id=CVE-2025-56225
- https://github.com/FluidSynth/fluidsynth/commit/45f2a79f4265dcc4f98cfbafdb10727fb1c0d411

Applied to 2025.02.x. Thanks

Quoted 58 lines
---
 ...inter-dereference-during-legato-mode.patch | 25 +++++++++++++++++++
 package/fluidsynth/fluidsynth.mk              |  3 +++
 2 files changed, 28 insertions(+)
 create mode 100644 package/fluidsynth/0001-Fix-a-nullpointer-dereference-during-legato-mode.patch
package/fluidsynth/0001-Fix-a-nullpointer-dereference-during-legato-mode.patch new file +25 -0
new file mode 100644
index 0000000000..a155164bcf
@@ -0,0 +1,25 @@
+From 45f2a79f4265dcc4f98cfbafdb10727fb1c0d411 Mon Sep 17 00:00:00 2001
+From: "Tom M." <[email protected]>
+Date: Mon, 14 Jul 2025 18:13:38 +0200
+Subject: [PATCH] Fix a nullpointer dereference during legato mode (#1607)
+
+CVE: CVE-2025-56225
+Upstream: https://github.com/FluidSynth/fluidsynth/commit/45f2a79f4265dcc4f98cfbafdb10727fb1c0d411
+Signed-off-by: Thomas Perale <[email protected]>
+---
+ src/synth/fluid_synth_monopoly.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/synth/fluid_synth_monopoly.c b/src/synth/fluid_synth_monopoly.c
+index d1de13196..6e6e2a906 100644
+--- a/src/synth/fluid_synth_monopoly.c
++++ b/src/synth/fluid_synth_monopoly.c
+@@ -410,7 +410,7 @@ int fluid_synth_noteoff_mono_LOCAL(fluid_synth_t *synth, int chan, int key)
+                 fluid_channel_breath_msb(channel))
+         {
+             /* legato playing detection */
+-            if(channel->mode  & FLUID_CHANNEL_LEGATO_PLAYING)
++            if (channel->mode & FLUID_CHANNEL_LEGATO_PLAYING && channel->preset != NULL)
+             {
+                 /* the list contains others notes */
+                 if(i_prev >= 0)
package/fluidsynth/fluidsynth.mk +3 -0
index 1c9139aa9f..bde3f416a7 100644
@@ -12,6 +12,9 @@ FLUIDSYNTH_CPE_ID_VENDOR = fluidsynth
 FLUIDSYNTH_INSTALL_STAGING = YES
 FLUIDSYNTH_DEPENDENCIES = libglib2
 
+# 0001-Fix-a-nullpointer-dereference-during-legato-mode.patch
+FLUIDSYNTH_IGNORE_CVES += CVE-2025-56225
+
 ifeq ($(BR2_PACKAGE_FLUIDSYNTH_ALSA_LIB),y)
 FLUIDSYNTH_CONF_OPTS += -Denable-alsa=1
 FLUIDSYNTH_DEPENDENCIES += alsa-lib
Signature · 6 lines
2.53.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot