Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 529428 - DLL files in the jar file are not signed.
Summary: DLL files in the jar file are not signed.
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.3.2   Edit
Hardware: PC Windows All
: P3 enhancement with 6 votes (vote)
Target Milestone: 4.13 M3   Edit
Assignee: Sravan Kumar Lakkimsetti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 548443
  Show dependency tree
 
Reported: 2018-01-04 11:30 EST by Vegard Søbstad Alsli CLA
Modified: 2019-08-07 04:07 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vegard Søbstad Alsli CLA 2018-01-04 11:30:59 EST
In my case this is causing problems for my Application Whitelisting solution. Every time there is a New dll file we need to update Our ruleset.
Comment 1 Rob Sigel CLA 2019-07-01 11:50:44 EDT
I've gotten a report now of a customer having their SWT DLLs getting infected by malware.  In the customer's case, the infected SWT DLLs were the ones extracted/cached by the OSGI framework in the workspace directory.

You know, one of those fun locations like
  configuration\org.eclipse.osgi\631\0\.cp\*.dll
where the files are in the user home directory, and are thus (over)writable by all user processes, including malware?  Unlike the known-good files kept in the installation directory, which require admin permissions to overwrite?

If eclipse/osgi is going to be copying SWT DLLs to the user directory before loading them, then these SWT DLLs should REALLY be signed in all releases!  (I'm saying this under the assumption that malware would violate the signatures when overwriting, thus keeping them from being subsequently loaded, but this is admittedly not my area of expertise.)

If my understanding of the underlying security problem is correct, then I'd propose that this is not a P3 Enhancement, but is instead a P1 critical security issue.
Comment 2 Nikita Nemkin CLA 2019-07-01 12:22:12 EDT
(In reply to Rob Sigel from comment #1)
> If eclipse/osgi is going to be copying SWT DLLs to the user directory before
> loading them, then these SWT DLLs should REALLY be signed in all releases! 
> (I'm saying this under the assumption that malware would violate the
> signatures when overwriting, thus keeping them from being subsequently
> loaded, but this is admittedly not my area of expertise.)

Bad signature doesn't prevent DLL loading.
Comment 3 Vegard Søbstad Alsli CLA 2019-07-01 12:40:38 EDT
(In reply to Nikita Nemkin from comment #2)
> (In reply to Rob Sigel from comment #1)
> > If eclipse/osgi is going to be copying SWT DLLs to the user directory before
> > loading them, then these SWT DLLs should REALLY be signed in all releases! 
> > (I'm saying this under the assumption that malware would violate the
> > signatures when overwriting, thus keeping them from being subsequently
> > loaded, but this is admittedly not my area of expertise.)
> s.
> Bad signature doesn't prevent DLL loading.

It does if you run applocker or any other dll whitelisting solution. Which is starting to become very common. Also executables should be signed, period.
Comment 4 Rob Sigel CLA 2019-07-01 15:28:17 EDT
Thanks for the quick response!

Even if a bad signature doesn't prohibit DLL loading (at sites where whitelists aren't used), a bad signature DOES help *immediately* show that the infected DLL on a user system is NOT the same DLL that Eclipse shipped.  It helps avoid poor publicity and misplaced blame.

My current customer is trying to blame us (and Eclipse) for the problem, while I'm trying to convince them (by pointing at the uninfected DLL in the signed jar, also visible on their machine) that the infection happened on their own machine, and was not present in the application as-shipped.

The customer is also pointing out that extracting unsigned DLLs into user-writable space is poor/insecure design, and I can't disagree with them.  But since this is a design decision in the underlying OSGI/Eclipse frameworks, I'm not aware of anything I can do about it either...

As a workaround for the security aspect, is there any ini file, env var, command-line option, or other configuration change I can make to keep the presently-unsigned SWT DLLs from ever being written to the configuration directory (or any other user-process-writable directory, including temp dirs) at runtime, so that the DLLs are never able to be infected by malware?
Comment 5 Thomas Watson CLA 2019-08-06 08:54:39 EDT
(In reply to Rob Sigel from comment #4)
> As a workaround for the security aspect, is there any ini file, env var,
> command-line option, or other configuration change I can make to keep the
> presently-unsigned SWT DLLs from ever being written to the configuration
> directory (or any other user-process-writable directory, including temp
> dirs) at runtime, so that the DLLs are never able to be infected by malware?

The SWT fragments that contain the DLLs could be shipped as directory bundles such that they are extracted to a directory in the plugins/ folder which I would assume is OK since that is the installation of eclipse itself.  We are limited by what the JVM can do to load libraries.  It requires there to be a file on disk with the native library.
Comment 6 Rolf Theunissen CLA 2019-08-06 09:16:59 EDT
I noticed that the DDL's in the latest nightly build are signed, both in the jar and the check in versions. (v4928r12e)

Is somebody actively changing the build configuration, or is this a side effect of earlier changes? I can't find a commit related to those changes.
Comment 7 Andrey Loskutov CLA 2019-08-06 09:19:06 EDT
(In reply to Rolf Theunissen from comment #6)
> I noticed that the DDL's in the latest nightly build are signed, both in the
> jar and the check in versions. (v4928r12e)
> 
> Is somebody actively changing the build configuration, or is this a side
> effect of earlier changes? I can't find a commit related to those changes.

Something along bug 548431 commits?
Comment 8 Sravan Kumar Lakkimsetti CLA 2019-08-07 03:05:11 EDT
(In reply to Andrey Loskutov from comment #7)
> (In reply to Rolf Theunissen from comment #6)
> > I noticed that the DDL's in the latest nightly build are signed, both in the
> > jar and the check in versions. (v4928r12e)
> > 
> > Is somebody actively changing the build configuration, or is this a side
> > effect of earlier changes? I can't find a commit related to those changes.
> 
> Something along bug 548431 commits?

Thats correct. I made changes to SWT build scripts to sign SWT build fragments. Also the Launcher fragments are also signed now
Comment 9 Andrey Loskutov CLA 2019-08-07 03:19:37 EDT
(In reply to Sravan Kumar Lakkimsetti from comment #8)
> > Something along bug 548431 commits?
> 
> Thats correct. I made changes to SWT build scripts to sign SWT build
> fragments. Also the Launcher fragments are also signed now

So can we close this one, or make a duplicate of bug 548431?
Comment 10 Sravan Kumar Lakkimsetti CLA 2019-08-07 04:07:32 EDT
The SWT build artifacts are signed now. resolving