Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8336024

Classloader loads inappropriate .class files

XMLWordPrintable

      ADDITIONAL SYSTEM INFORMATION :
      Windows 11, Java 21
      but I believe this is a "forever" bug on windows.

      A DESCRIPTION OF THE PROBLEM :
      Tracking a mystery error, I discovered that the cause was that .class files were being pulled from
      my desktop instead of the jar files where they were expected to reside. This is a fairly complex situation,
      the application in question uses a custom classloader, which creates and maintains a local cache of jar
      files downloaded from a web server. It "ought to" be the case that the downloaded .jars, and only those
      jars, are the source for the application's class files.



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Install the boardspace.net app (and note that it works). The canonical test in this case
      is to select the game "Blooms" and launch a game.

      Using a tool such as "procmon", note that as the game is being launched, the desktop file
      file system is being probed for files such as "Desktop/blooms/BloomsViewer.class" This is
      completely inappropriate, and if those files exist the application will misbehave. It's also
      probably a security hole that could be exploited.

      Install a separate folder of related, but obsolete class files on your desktop. (I can supply one)
      and note that the probed files are actually used and actually cause misbehavior.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Random files from the desktop environment shouldn't be used.
      ACTUAL -
      They are.


      FREQUENCY : always


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: