From eefa8881ec69123645add5f274836c588c61e0cf Mon Sep 17 00:00:00 2001 From: ghizard <50744617+ghizard@users.noreply.github.com> Date: Mon, 22 Sep 2025 12:00:42 -0400 Subject: [PATCH 1/4] GP-0 - What's New Edits --- .../Public_Release/src/global/docs/WhatsNew.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md index f40fea0607..63d889a12f 100644 --- a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md +++ b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md @@ -5,7 +5,7 @@ to analyze compiled code on a variety of platforms including Windows, MacOS, and include disassembly, assembly, decompilation, debugging, emulation, graphing, and scripting, along with hundreds of other features. Ghidra supports a wide variety of processor instruction sets and executable formats and can be run in both user-interactive and automated modes. Users may also -develop their own Ghidra plug-in components and/or scripts using the exposed API. In addition there +develop their own Ghidra plug-in components and/or scripts using the exposed API. In addition, there are numerous ways to extend Ghidra such as new processors, loaders/exporters, automated analyzers, and new visualizations. @@ -25,7 +25,7 @@ Ghidra 12.0 is fully backward compatible with project data from previous release and data type archives which are created or modified in 12.0 will not be usable by an earlier Ghidra version. -**IMPORTANT:** Ghidra 12.0 requires at minimum JDK 21 to run. +**IMPORTANT:** Ghidra 12.0 requires, at minimum, JDK 21 to run. **IMPORTANT:** To use the Debugger or do a full source distribution build, you will need Python3 (3.9 to 3.13 supported) installed on your system. @@ -35,7 +35,7 @@ for `CVE-2024-31083` in X.org software in April 2024 introduced a regression, wh in xwayland 23.2.6 and xorg-server 21.1.13. If you experience any crashing of Ghidra, most likely causing a full logout, check if your xorg-server has been updated to at least the noted version. -**NOTE:** Each build distribution will include native components (e.g., decompiler) for at least one +**NOTE:** Each build distribution will include native components (e.g., Decompiler) for at least one platform (e.g., Windows x86-64). If you have another platform that is not included in the build distribution, you can build native components for your platform directly from the distribution. See the *Getting Started* document for additional information. Users running with older shared @@ -44,9 +44,9 @@ launching native executables such as the Decompiler and GNU Demangler which may rebuild of native components. **NOTE:** Ghidra Server: The Ghidra 12.0 server is compatible with Ghidra 9.2 and later Ghidra -clients although the presence of any newer link-files within a repository may not be handled properly +clients, although the presence of any newer link-files within a repository may not be handled properly by client versions prior to 12.0 which lack support for the new storage format. Ghidra 12.0 clients -which introduce new link-files into a project will not be able to add such files into version +that introduce new link-files into a project will not be able to add such files into version control if connected to older Ghidra Server versions. **NOTE:** Ghidra Server: Due to potential Java version differences, it is @@ -100,7 +100,7 @@ can also be used in headless mode with the new `-mirror` command line option. ## PyGhidra PyGhidra 3.0.0 (compatible with Ghidra 12.0 and later) introduces many new Python-specific API methods with the goal of making the most common Ghidra tasks quick and easy, such as opening a -project, getting a program, running a GhidraScript, etc. Legacy API fuctions such as +project, getting a program, and running a GhidraScript. Legacy API fuctions such as `pyghidra.open_program()` and `pyghidra_run_script()` have been deprecated in favor of the new methods. Below is an example program that showcases some of the new API functionality. See the PyGhidra library README for more information. @@ -148,7 +148,7 @@ with pyghidra.open_project(os.environ["GHIDRA_PROJECT_DIR"], "ExampleProject", c ``` ## Z3 Concolic Emulation and Symbolic Summary -We've added an experimental Z3-based symbolic emulator, which runs as a "auxilliary" domain to the +We've added an experimental Z3-based symbolic emulator, which runs as an "auxilliary" domain to the concrete emulator, effectively constructing what is commonly called a "concolic" emulator. The symbolic emulator creates Z3 expressions and branching constraints, but it only follows the path determined by concrete emulation. This is most easily accessed by installing the "SymbolicSummaryZ3" @@ -166,7 +166,7 @@ our JIT-accelerated emulator into the GUI. Please see the **Notable API Changes* [Change History](ChangeHistory.md). The goal is to facilitate integration by composition; whereas, it had previously required inheritance, which is now considered poor design. Essentially, we've introduced a set of callbacks that integrators can use to detect when certain things have happened -in emulation, as well as offer some control of machine-state behavior, e.g., to facilitate lazily +in emulation, as well as offer some control of machine-state behavior; e.g., to facilitate lazily loading from a snapshot. Extensions that currently integrate via inheritance can continue to do so, but will still need to From cca597318ee07c1e7d8bea6c6bfedba626dce6ca Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 23 Sep 2025 07:13:30 -0400 Subject: [PATCH 2/4] GP-6014: Setting minimum java version in OSGi bundles, and adding "Bundle Location ID" hidden column --- .../core/osgi/BundleStatusTableModel.java | 26 +++++++++++++++++-- .../plugin/core/osgi/GhidraSourceBundle.java | 9 +++++++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleStatusTableModel.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleStatusTableModel.java index 2045cafd90..6b11e7b968 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleStatusTableModel.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleStatusTableModel.java @@ -4,9 +4,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -396,6 +396,7 @@ public class BundleStatusTableModel columnDescriptor.addVisibleColumn(new BuildSummaryColumn()); columnDescriptor.addHiddenColumn(new OSGiStatusColumn()); columnDescriptor.addHiddenColumn(new BundleTypeColumn()); + columnDescriptor.addHiddenColumn(new BundleLocationId()); return columnDescriptor; } @@ -548,6 +549,27 @@ public class BundleStatusTableModel } } + + private class BundleLocationId extends Column { + + BundleLocationId() { + super("Bundle Location ID"); + } + + @Override + public String getValue(BundleStatus status, Settings settings, List data, + ServiceProvider serviceProvider0) throws IllegalArgumentException { + GhidraBundle bundle = bundleHost.getGhidraBundle(status.getFile()); + if (bundle != null) { + String id = bundle.getLocationIdentifier(); + if (id != null) { + return id; + } + } + return ""; + } + + } private class BundleFileRenderer extends AbstractGColumnRenderer { diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java index b5ffdfdadc..7b02ecf671 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/GhidraSourceBundle.java @@ -45,6 +45,8 @@ import aQute.bnd.osgi.Clazz.QUERY; import generic.io.NullPrintWriter; import generic.jar.ResourceFile; import ghidra.app.script.*; +import ghidra.framework.Application; +import ghidra.framework.ApplicationProperties; import ghidra.util.Msg; import util.CollectionUtils; import utilities.util.FileUtilities; @@ -880,6 +882,13 @@ public class GhidraSourceBundle extends GhidraBundle { analyzer.setProperty("Export-Package", "!*.private.*,!*.internal.*,*"); + String minJava = + Application.getApplicationProperty(ApplicationProperties.APPLICATION_JAVA_MIN_PROPERTY); + if (minJava != null) { + analyzer.setProperty("Require-Capability", + "osgi.ee;filter:=\"(&(osgi.ee=JavaSE)(version>=%s))\"".formatted(minJava)); + } + try { Manifest manifest; try { From b7a5878e353c477215d06057efe6f7d9e887b840 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 23 Sep 2025 09:29:56 -0400 Subject: [PATCH 3/4] GP-0: Explicitly enable native access to make new JDK 25 FlatLaf warnings go away --- Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch | 2 +- Ghidra/Features/Base/.launch/Ghidra.launch | 2 +- Ghidra/Features/Base/.launch/JShell.launch | 2 +- Ghidra/RuntimeScripts/Common/support/launch.properties | 3 +++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch b/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch index 72fe91facf..74a36db34c 100644 --- a/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch +++ b/Ghidra/Features/Base/.launch/Ghidra Code Coverage.launch @@ -29,6 +29,6 @@ - + diff --git a/Ghidra/Features/Base/.launch/Ghidra.launch b/Ghidra/Features/Base/.launch/Ghidra.launch index 84bb740495..2ec4595746 100644 --- a/Ghidra/Features/Base/.launch/Ghidra.launch +++ b/Ghidra/Features/Base/.launch/Ghidra.launch @@ -31,5 +31,5 @@ - + diff --git a/Ghidra/Features/Base/.launch/JShell.launch b/Ghidra/Features/Base/.launch/JShell.launch index b10bb73a10..7b9445dce7 100644 --- a/Ghidra/Features/Base/.launch/JShell.launch +++ b/Ghidra/Features/Base/.launch/JShell.launch @@ -31,5 +31,5 @@ - + diff --git a/Ghidra/RuntimeScripts/Common/support/launch.properties b/Ghidra/RuntimeScripts/Common/support/launch.properties index 467f53b832..6ab383cf93 100644 --- a/Ghidra/RuntimeScripts/Common/support/launch.properties +++ b/Ghidra/RuntimeScripts/Common/support/launch.properties @@ -88,6 +88,9 @@ VMARGS=-Djavax.xml.accessExternalDTD= VMARGS=-Djavax.xml.accessExternalSchema= VMARGS=-Djavax.xml.accessExternalStylesheet= +# Enable native access (required by FlatLaf) +VMARGS=--enable-native-access=ALL-UNNAMED + # Settings directory used by the application to store application settings and data that persist # between application sessions, system reboots, and periodic system cleanup. Overridden values # are required to be absolute paths. The current user name may be incorporated into the settings From 52b4d46cb34034e151737b87cf9713e06f11d757 Mon Sep 17 00:00:00 2001 From: Ryan Kurtz Date: Tue, 23 Sep 2025 11:38:29 -0400 Subject: [PATCH 4/4] GP-0: Detecting VSCode in Windows system installer location (Closes #8514) --- .../vscode/VSCodeIntegrationOptionsPlugin.java | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/vscode/VSCodeIntegrationOptionsPlugin.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/vscode/VSCodeIntegrationOptionsPlugin.java index 749be4ba4d..e32e0675a0 100644 --- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/vscode/VSCodeIntegrationOptionsPlugin.java +++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/vscode/VSCodeIntegrationOptionsPlugin.java @@ -66,12 +66,18 @@ public class VSCodeIntegrationOptionsPlugin extends Plugin implements Applicatio */ private static File getDefaultVSCodeExecutable() { return switch (OperatingSystem.CURRENT_OPERATING_SYSTEM) { - case WINDOWS -> new File(System.getenv("LOCALAPPDATA"), - "Programs/Microsoft VS Code/bin/code.cmd"); - case MAC_OS_X -> new File( - "/Applications/Visual Studio Code.app/Contents/MacOS/Electron"); - case LINUX -> new File("/usr/bin/code"); - default -> null; + case WINDOWS: + File local = new File(System.getenv("LOCALAPPDATA"), + "Programs/Microsoft VS Code/bin/code.cmd"); + File admin = + new File(System.getenv("PROGRAMFILES"), "Microsoft VS Code/bin/code.cmd"); + yield admin.exists() ? admin : local; + case MAC_OS_X: + yield new File("/Applications/Visual Studio Code.app/Contents/MacOS/Electron"); + case LINUX: + yield new File("/usr/bin/code"); + default: + yield null; }; } }