Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13300

Ignite sandbox vulnerability allows to execute user code in privileged proxy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.9
    • 2.9
    • security

    Description

      Ignite sandbox returns a privileged proxy for Ignite and some other system interfaces. If the user implements one of these interfaces and gets via privileged proxy an instance of implemented class, privileged proxy for user class will be returned.
      Reproducer:

      public class PrivilegedProxyTest extends AbstractSandboxTest {
          public void testPrivelegedUserObject() throws Exception {
              grid(CLNT_FORBIDDEN_WRITE_PROP).getOrCreateCache(DEFAULT_CACHE_NAME).put(0, new TestIterator<>());
      
              runForbiddenOperation(() -> grid(CLNT_FORBIDDEN_WRITE_PROP).compute().run(() -> {
                  GridIterator<?> it = (GridIterator<?>)Ignition.localIgnite().cache(DEFAULT_CACHE_NAME).get(0);
      
                  it.iterator();
              }), AccessControlException.class);
          }
      
          public static class TestIterator<T> extends GridIterableAdapter<T> {
              public TestIterator() {
                  super(Collections.emptyIterator());
              }
      
              @Override public GridIterator<T> iterator() {
                  controlAction();
      
                  return super.iterator();
              }
          }
      }
      

      Attachments

        Issue Links

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m