diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php b/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
index 30dc2d3..1906abb 100644
--- a/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
+++ b/core/modules/config/lib/Drupal/config/Form/ConfigImportForm.php
@@ -39,15 +39,20 @@ public function validateForm(array &$form, array &$form_state) {
   public function submitForm(array &$form, array &$form_state) {
     if ($path = $form_state['values']['import_tarball']) {
       \Drupal::service('config.storage.staging')->deleteAll();
-      $archiver = new ArchiveTar($path, 'gz');
-      $files = array();
-      foreach ($archiver->listContent() as $file) {
-        $files[] = $file['filename'];
+      try {
+        $archiver = new ArchiveTar($path, 'gz');
+        $files = array();
+        foreach ($archiver->listContent() as $file) {
+          $files[] = $file['filename'];
+        }
+        $archiver->extractList($files, config_get_config_directory(CONFIG_STAGING_DIRECTORY));
+        drupal_set_message('Your configuration files were successfully uploaded, ready for import.');
+        $form_state['redirect'] = 'admin/config/development/sync';
+      }
+      catch (\Exception $e) {
+        form_set_error('import_tarball', t('Could not extract the contents of the tar file. The error message is <em>@message</em>', array('@message' => $e->getMessage())));
       }
-      $archiver->extractList($files, config_get_config_directory(CONFIG_STAGING_DIRECTORY));
       drupal_unlink($path);
-      drupal_set_message('Your configuration files were successfully uploaded, ready for import.');
-      $form_state['redirect'] = 'admin/config/development/sync';
     }
   }
 }
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportUploadTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUploadTest.php
new file mode 100644
index 0000000..e753695
--- /dev/null
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUploadTest.php
@@ -0,0 +1,49 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\config\Tests\ConfigImportUploadTest.
+ */
+
+namespace Drupal\config\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests importing configuration from an uploaded file.
+ */
+class ConfigImportUploadTest extends WebTestBase {
+
+  public static $modules = array('config');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Import uploaded config',
+      'description' => 'Tests importing configuration from an uploaded file.',
+      'group' => 'Configuration'
+    );
+  }
+
+  function setUp() {
+    parent::setUp();
+
+    $this->web_user = $this->drupalCreateUser(array('import configuration'));
+    $this->drupalLogin($this->web_user);
+  }
+
+  /**
+   * Tests importing configuration.
+   */
+  function testImport() {
+    // Verify access to the config upload form.
+    $this->drupalGet('admin/config/development/import');
+    $this->assertResponse(200);
+
+    // Attempt to upload a non-tar file.
+    $text_file = current($this->drupalGetTestFiles('text'));
+    $edit = array('files[import_tarball]' => drupal_realpath($text_file->uri));
+    $this->drupalPost('admin/config/development/import', $edit, t('Upload'));
+    $this->assertText(t('Could not extract the contents of the tar file'));
+  }
+
+}
