From e18f7bb4e5ce243bdc8b9471108f1990c6dbaca6 Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Tue, 5 May 2026 13:35:15 -0400 Subject: [PATCH 1/2] GP-1 Revised Ghidra Server interface version and compatibility checks. --- .../ghidra/server/remote/GhidraServer.java | 21 +++++-- .../client/RepositoryServerAdapter.java | 6 +- .../framework/client/ServerConnectTask.java | 27 ++++---- .../framework/remote/GhidraServerHandle.java | 63 +++++++++++++++---- 4 files changed, 84 insertions(+), 33 deletions(-) diff --git a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java index 927caf738e..f788c33b9e 100644 --- a/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java +++ b/Ghidra/Features/GhidraServer/src/main/java/ghidra/server/remote/GhidraServer.java @@ -243,15 +243,15 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan } @Override - public void checkCompatibility(int minServerInterfaceVersion) throws RemoteException { - if (minServerInterfaceVersion > INTERFACE_VERSION) { + public void checkCompatibility(int clientInterfaceVersion) throws RemoteException { + if (clientInterfaceVersion > SERVER_INTERFACE_VERSION) { throw new RemoteException( "Incompatible server interface, a newer Ghidra Server version is required."); } - else if (minServerInterfaceVersion < MINIMUM_INTERFACE_VERSION) { + else if (clientInterfaceVersion < SERVER_MIN_CLIENT_INTERFACE_VERSION) { throw new RemoteException( "Incompatible server interface, the minimum supported Ghidra version is " + - MIN_GHIDRA_VERSION); + ALT_GHIDRA_BIND_VERSION); } } @@ -871,9 +871,20 @@ public class GhidraServer extends UnicastRemoteObject implements GhidraServerHan Registry registry = LocateRegistry.createRegistry( ServerPortFactory.getRMIRegistryPort(), clientSocketFactory, serverSocketFactory); + + StringBuilder bindVersions = new StringBuilder(" ("); + bindVersions.append(GHIDRA_BIND_VERSION); registry.bind(BIND_NAME, svr); - log.info("Registered Ghidra Server."); + if (!BIND_NAME.equals(ALT_BIND_NAME)) { + // Include alternate binding in support of older Ghidra client versions + bindVersions.append(", "); + bindVersions.append(ALT_GHIDRA_BIND_VERSION); + registry.bind(ALT_BIND_NAME, svr); + } + bindVersions.append(")"); + + log.info("Registered Ghidra Server" + bindVersions); } catch (Throwable t) { diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/RepositoryServerAdapter.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/RepositoryServerAdapter.java index 30c7471d8c..963dc5fdd4 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/RepositoryServerAdapter.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/RepositoryServerAdapter.java @@ -199,7 +199,7 @@ public class RepositoryServerAdapter { lastConnectError = t; } Msg.showError(this, null, "Server Error", - "An error occurred on the server (" + serverInfoStr + ").\n" + msg, e); + "An error occurred on the server (" + serverInfoStr + ").\n" + msg); } catch (IOException e) { String err = e.getMessage(); @@ -208,8 +208,8 @@ public class RepositoryServerAdapter { } String msg = err != null ? err : e.toString(); Msg.showError(this, null, "Server Error", - "An error occurred while connecting to the server (" + serverInfoStr + ").\n" + msg, - e); + "An error occurred while connecting to the server (" + serverInfoStr + ").\n" + + msg); } throw new NotConnectedException("Not connected to repository server", lastConnectError); } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java index a7353c6864..87de89dc07 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/client/ServerConnectTask.java @@ -175,7 +175,7 @@ class ServerConnectTask extends Task { gsh = (GhidraServerHandle) reg.lookup(GhidraServerHandle.BIND_NAME); // Check interface compatibility with the minimum supported version - gsh.checkCompatibility(GhidraServerHandle.MINIMUM_INTERFACE_VERSION); + gsh.checkCompatibility(GhidraServerHandle.MIN_CLIENT_INTERFACE_VERSION); } catch (NotBoundException e) { throw new IOException(e.getMessage()); @@ -420,29 +420,32 @@ class ServerConnectTask extends Task { } } - private static void checkServerBindNames(Registry reg) throws RemoteException { + private static void checkServerBindNames(Registry reg) throws IOException { - String requiredVersion = GhidraServerHandle.MIN_GHIDRA_VERSION; + String requiredVersion = GhidraServerHandle.GHIDRA_BIND_VERSION; if (!Application.getApplicationVersion().startsWith(requiredVersion)) { requiredVersion = requiredVersion + " - " + Application.getApplicationVersion(); } + requiredVersion += " (or possibly newer)"; String[] regList = reg.list(); - RemoteException exc = null; + IOException exc = null; int badVerCount = 0; + String version = null; for (String name : regList) { if (name.equals(GhidraServerHandle.BIND_NAME)) { return; // found it } else if (name.startsWith(GhidraServerHandle.BIND_NAME_PREFIX)) { - String version = name.substring(GhidraServerHandle.BIND_NAME_PREFIX.length()); + // NOTE: We only report one version even if server has multiple bindings + version = name.substring(GhidraServerHandle.BIND_NAME_PREFIX.length()); if (version.length() == 0) { version = "4.3.x (or older)"; } - exc = new RemoteException( - "Incompatible Ghidra Server interface, detected interface version " + version + - ",\nthis client requires server version " + requiredVersion); + exc = new IOException( + "Incompatible Ghidra Server - detected interface version " + version + + ".\nThis client requires server version " + requiredVersion); ++badVerCount; } } @@ -450,11 +453,11 @@ class ServerConnectTask extends Task { if (badVerCount == 1) { throw exc; } - throw new RemoteException("Incompatible Ghidra Server interface, detected " + - badVerCount + " incompatible server versions" + - ",\nthis client requires server version " + requiredVersion); + throw new IOException("Incompatible Ghidra Server - detected " + + badVerCount + " incompatible server versions." + + "\nThis client requires server version " + requiredVersion); } - throw new RemoteException("Ghidra Server not found."); + throw new IOException("Ghidra Server not found."); } } diff --git a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraServerHandle.java b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraServerHandle.java index f1e6e0c10b..b2672867db 100644 --- a/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraServerHandle.java +++ b/Ghidra/Framework/FileSystem/src/main/java/ghidra/framework/remote/GhidraServerHandle.java @@ -52,23 +52,53 @@ public interface GhidraServerHandle extends Remote { * unchanged allowing 9.1 clients to connect to 9.0 server. * 12: Revised RepositoryFile serialization to facilitate support for text-data used * for link-file storage (12.0). + * 13: Client-side serialization filters have been implemented and server-side thrown + * exceptions reduced to be compliant with client-side filters. Server still + * supports older clients back to interface version 11. Server may now BIND + * to the RMI registery with two different names if needed. */ /** - * The server interface version that the server will use and is the maximum version that the - * client can operate with. + * The server interface version that the server implements. This corresponds to the maximum + * supported client interface version. */ - public static final int INTERFACE_VERSION = 12; + public static final int SERVER_INTERFACE_VERSION = 13; /** * The minimum server interface version that the client can operate with. */ - public static final int MINIMUM_INTERFACE_VERSION = 11; + public static final int MIN_CLIENT_INTERFACE_VERSION = 13; /** - * Minimum version of Ghidra which utilized the current INTERFACE_VERSION + * The minimum interface version that the server will support for older client versions. + * When this version is less than {@link #MIN_CLIENT_INTERFACE_VERSION} it allows the following: + * + * When this version differs from {@link #MIN_CLIENT_INTERFACE_VERSION} the server will bind two + * both {@link #BIND_NAME} and {@value #ALT_BIND_NAME}. + *

+ * NOTE: It is important that the server authentication interface not be modified between this + * version and {@value #MIN_CLIENT_INTERFACE_VERSION}. */ - public static final String MIN_GHIDRA_VERSION = "9.0"; + public static final int SERVER_MIN_CLIENT_INTERFACE_VERSION = 11; + + /** + * The server BIND version which the Ghidra client can communicate with. + * This corresponds to {@value #MIN_CLIENT_INTERFACE_VERSION}. + */ + public static final String GHIDRA_BIND_VERSION = "12.0.5"; + + /** + * Minimum version of a Ghidra client release which can communicate with the current + * Ghidra Server. This corresponds to {@value #SERVER_MIN_CLIENT_INTERFACE_VERSION} + * and {@link #ALT_BIND_NAME}. + *

+ * This version is used only by the server only in publishing an alternate BIND name and + * identifies the oldest Ghidra client version that may connect. + */ + public static final String ALT_GHIDRA_BIND_VERSION = "9.0"; /** * Default RMI base port for Ghidra Server @@ -81,13 +111,21 @@ public interface GhidraServerHandle extends Remote { static final String BIND_NAME_PREFIX = "GhidraServer"; /** - * RMI registry binding name for the supported version of the remote GhidraServerHandle object. + * Primary RMI registry binding name for the remote GhidraServerHandle object. + * This BIND name is used by both the server and client. */ - static final String BIND_NAME = BIND_NAME_PREFIX + MIN_GHIDRA_VERSION; + static final String BIND_NAME = BIND_NAME_PREFIX + GHIDRA_BIND_VERSION; + + /** + * Alternate RMI registry binding name for the remote GhidraServerHandle object. + * This alternate BIND name is used only by the server in support of older Ghidra clients + * and corresponds to {@link #SERVER_MIN_CLIENT_INTERFACE_VERSION}. + */ + static final String ALT_BIND_NAME = BIND_NAME_PREFIX + ALT_GHIDRA_BIND_VERSION; /** * Returns user authentication proxy object. - * @throws RemoteException + * @throws RemoteException if failure occurs while generating authentication callbacks * @return authentication callbacks which must be satisfied or null if authentication not * required. */ @@ -107,11 +145,10 @@ public interface GhidraServerHandle extends Remote { throws FailedLoginException, RemoteException; /** - * Check server interface compatibility - * @param serverInterfaceVersion client/server interface version + * Check server interface compatibility with the specified client interface version. + * @param clientInterfaceVersion client/server interface version * @throws RemoteException if requested server interface version not available - * @see #INTERFACE_VERSION */ - void checkCompatibility(int serverInterfaceVersion) throws RemoteException; + void checkCompatibility(int clientInterfaceVersion) throws RemoteException; } From 6c8463a528d2d9b408ec2a23541e379ddbe31e73 Mon Sep 17 00:00:00 2001 From: ghidra1 Date: Tue, 5 May 2026 15:13:58 -0400 Subject: [PATCH 2/2] GP-0 Updated WhatsNew and ChangeHistory --- .../src/global/docs/ChangeHistory.md | 14 +++++ .../src/global/docs/WhatsNew.md | 52 ++++++++++++++----- 2 files changed, 52 insertions(+), 14 deletions(-) diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.md b/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.md index 7475961002..8a5a7569a5 100644 --- a/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.md +++ b/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.md @@ -1,3 +1,17 @@ +# Ghidra 12.0.5 Change History (May 2026) + +### Improvements +* _Multi-User_. Improved Ghidra Server serialization filters and added serialization filters to client-side Ghidra applications. We may have missed something in our testing so let us know if you encounter an `InvalidClassException`. The log will identify a class which fails to pass the filter rules. (GP-6719) +* _Project_. Expanded on the set of allowed special characters for a local Ghidra project path name to include the following: `'.'`, `'-'`, `'='`, `'@'`, `' '`, `'_'`, `'('`, `')'`, `'['`, `']'`, and `'~'`. (GP-6681) +* _Scripting_. Made some improvements to the RecoverClassesFromRTTIScript for GCC programs. (GP-6670) + +### Bugs +* _Data Types_. Corrected upgrade failure which can occur for Project Data Type Archives. (GP-6649) +* _Decompiler_. Updated the Decompiler to not re-decompile when creating a snapshot of the current function. (GP-6629) +* _Function_. Corrected possible exception within Function Editor when applying simple parameter renames made within table. (GP-6746) +* _GUI_. Corrected behavior of Function Call Tree when traversing thunk functions. (GP-6653) +* _Multi-User_. Corrected potential security concern with Ghidra Server PKI Authentication. If using PKI Authentication mode (`-a2`) for the server install, the user should upgrade the server. See reported Ghidra GitHub Pull Request #9109 for more details. (GP-6678, Issue #9109) + # Ghidra 12.0.4 Change History (March 2026) ### Improvements diff --git a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md index 36872a02d0..b1636e1249 100644 --- a/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md +++ b/Ghidra/Configurations/Public_Release/src/global/docs/WhatsNew.md @@ -15,17 +15,17 @@ applied Ghidra SRE capabilities to a variety of problems that involve analyzing generating deep insights for NSA analysts who seek a better understanding of potential vulnerabilities in networks and systems. -# What's New in Ghidra 12.0 -This release includes new features, enhancements, performance improvements, quite a few bug fixes, -and many pull-request contributions. Thanks to all those who have contributed their time, thoughts, -and code. The Ghidra user community thanks you too! +# What's New in Ghidra 12.0.5 +This patch release addresses some significant bugs and security flaws within Ghidra and the Ghidra +Server applications. It is highly recommended that all Ghidra and Ghidra Server installations be +upgraded to this release if not already running 12.1 or later. ### The not-so-fine print: Please Read! -Ghidra 12.0 is fully backward compatible with project data from previous releases. However, programs -and data type archives which are created or modified in 12.0 will not be usable by an earlier Ghidra +Ghidra 12.0.x is fully backward compatible with project data from previous releases. However, programs +and data type archives which are created or modified in 12.0.x will not be usable by an earlier Ghidra version. -**IMPORTANT:** Ghidra 12.0 requires, at minimum, JDK 21 to run. +**IMPORTANT:** Ghidra 12.0.x 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. @@ -43,15 +43,13 @@ libraries and operating systems (e.g., CentOS 7.x) may also run into compatibili launching native executables such as the Decompiler and GNU Demangler which may necessitate a rebuild of native components. -**NOTE:** Ghidra Server: The Ghidra 12.0 server is compatible with Ghidra 11.3.2 and later Ghidra +**NOTE:** Ghidra Server: The Ghidra 12.0.5 server is compatible with older Ghidra 11.3.2 and later Ghidra 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 -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. +by client versions prior to 12.0, which lack support for the new storage format. Ghidra 12.0.5 clients +require Ghidra Server version 12.0.5 or newer compatible version. -**NOTE:** Ghidra Server: Due to potential Java version differences, it is -recommended that Ghidra Server installations older than 10.2 be upgraded. Those using 10.2 and newer -should not need a server upgrade unless they need to work with link-files within a shared repository. +**NOTE:** Ghidra Server: Due to security fixes made to Ghidra and the Ghidra Server it is highly +recommended that older installation versions be updated to this latest release or 12.1.x. **NOTE:** Programs imported with a Ghidra beta version or code built directly from source code outside of a release tag may not be compatible, and may have flaws that won't be corrected by using @@ -64,6 +62,32 @@ process that will provide better results than prior Ghidra versions. You might fresh import of any program you will continue to reverse engineer to see if the latest Ghidra provides better results. +## Security Related Fixes + +### RMI Serialization Filter Improvements +RMI Serialization filters for the Ghidra Server have been tightened and similar filters have been +added to Ghidra client applications which may communicate with a Ghidra Server. Please report +any unexpected *InvalidClassException* errors, which may occur, to the Ghidra team. If this does occur, +please check your Ghidra or server application log files for entries which indicate any filter +rejections which would indicate the name of the offending class. + +### Ghidra Server - PKI Authentication Vulnerability +For those Ghidra Server deployments which utilize PKI Authentication mode (-a2), a logic bug +within the authentication callback to the server could allow an attacker to authenticate as a +different user without having access to their private key. Prior to completing the forged +authentication callback, the attacker would still need to successfully complete a fully authenticated +TLS connection with the Ghidra Server based on the installed Certificate Authorities (CAs). + +## Project Datatype Archive Upgrade Fix + +A severe bug has been corrected which prevented older Project Datatype Archives from opening properly +in 12.0.4, during an attempted updgrade. + + +# What's New in Ghidra 12.0.x + +The significant changes made in earlier 12.0.x releases are reiterated below. + ## Project Data Link Files Support for link-files within a Ghidra Project has been significantly expanded with this release and with it a new file storage type has been introduced which can create some incompatibilities if