diff --git a/core/includes/config.inc b/core/includes/config.inc
index 0011533..d0c27a0 100644
--- a/core/includes/config.inc
+++ b/core/includes/config.inc
@@ -182,6 +182,8 @@ function config_sync_changes(array $config_changes, StorageInterface $source_sto
   $factory = drupal_container()->get('config.factory');
   foreach (array('delete', 'create', 'change') as $op) {
     foreach ($config_changes[$op] as $name) {
+      // Validate the configuration object name before importing it.
+      Config::validateName($name);
       if ($op == 'delete') {
         $target_storage->delete($name);
       }
@@ -253,6 +255,8 @@ function config_import_invoke_owner(array $config_changes, StorageInterface $sou
   // handle dependencies correctly.
   foreach (array('delete', 'create', 'change') as $op) {
     foreach ($config_changes[$op] as $key => $name) {
+      // Validate the configuration object name before importing it.
+      Config::validateName($name);
       // Extract owner from configuration object name.
       $module = strtok($name, '.');
       // Check whether the module implements hook_config_import() and ask it to
diff --git a/core/lib/Drupal/Core/Config/Config.php b/core/lib/Drupal/Core/Config/Config.php
index 02ac961..ebf2e2a 100644
--- a/core/lib/Drupal/Core/Config/Config.php
+++ b/core/lib/Drupal/Core/Config/Config.php
@@ -8,6 +8,7 @@
 namespace Drupal\Core\Config;
 
 use Drupal\Component\Utility\NestedArray;
+use Drupal\Core\Config\ConfigNameException;
 use Symfony\Component\EventDispatcher\EventDispatcher;
 
 /**
@@ -16,6 +17,18 @@
 class Config {
 
   /**
+   * The maximum length of a configuration object name.
+   *
+   * Many filesystems (including HFS, NTFS, and ext4) have a maximum file name
+   * length of 255 characters. To ensure that no configuration objects
+   * incompatible with this limitation are created, we enforce a maximum name
+   * length of 250 characters (leaving 5 characters for the file extension).
+   *
+   * @see http://en.wikipedia.org/wiki/Comparison_of_file_systems
+   */
+  const MAX_NAME_LENGTH = 250;
+
+  /**
    * The name of the configuration object.
    *
    * @var string
@@ -123,6 +136,29 @@ public function setName($name) {
   }
 
   /**
+   * Validates the configuration object name.
+   *
+   * @throws \Drupal\Core\Config\ConfigNameException
+   *
+   * @see Config::MAX_NAME_LENGTH
+   */
+  public static function validateName($name) {
+    // The name must be namespaced by owner.
+    if (strpos($name, '.') === FALSE) {
+      throw new ConfigNameException(format_string('Missing namespace in Config object name @name.', array(
+        '@name' => $name,
+      )));
+    }
+    // The name must be shorter than Config::MAX_NAME_LENGTH characters.
+    if (strlen($name) > self::MAX_NAME_LENGTH) {
+      throw new ConfigNameException(format_string('Config object name @name exceeds maximum allowed length of @length characters.', array(
+        '@name' => $name,
+        '@length' => self::MAX_NAME_LENGTH,
+      )));
+    }
+  }
+
+  /**
    * Returns whether this configuration object is new.
    *
    * @return bool
@@ -390,6 +426,8 @@ public function load() {
    *   The configuration object.
    */
   public function save() {
+    // Validate the configuration object name before saving.
+    $this->validateName($this->name);
     if (!$this->isLoaded) {
       $this->load();
     }
@@ -448,7 +486,7 @@ protected function notify($config_event_name) {
     $this->eventDispatcher->dispatch('config.' . $config_event_name, new ConfigEvent($this));
   }
 
-  /*
+  /**
    * Merges data into a configuration object.
    *
    * @param array $data_to_merge
diff --git a/core/lib/Drupal/Core/Config/ConfigNameException.php b/core/lib/Drupal/Core/Config/ConfigNameException.php
new file mode 100644
index 0000000..bc4cabb
--- /dev/null
+++ b/core/lib/Drupal/Core/Config/ConfigNameException.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Config\ConfigNameException.
+ */
+
+namespace Drupal\Core\Config;
+
+/**
+ * Exception thrown when a config object name is invalid.
+ */
+class ConfigNameException extends ConfigException {}
diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
index 56e5ecf..9f0670a 100644
--- a/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
+++ b/core/modules/config/lib/Drupal/config/Tests/ConfigCRUDTest.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\config\Tests;
 
+use Drupal\Core\Config\ConfigNameException;
 use Drupal\simpletest\DrupalUnitTestBase;
 
 /**
@@ -103,4 +104,45 @@ function testCRUD() {
     $this->assertIdentical($new_config->get('404'), $expected_values['404']);
   }
 
+  /**
+   * Tests the validation of configuration object names.
+   */
+  function testNameValidation() {
+    // Verify that saving an object name without namespace throws an exception.
+    $name = 'nonamespace';
+    $message = 'Expected ConfigNameException was thrown for a name without a namespace.';
+    try {
+      $config = config($name);
+      $config->save();
+      $this->fail($message);
+    }
+    catch (ConfigNameException $e) {
+      $this->pass($message);
+    }
+
+    // Verify that saving a too long config object name throws an exception.
+    $name = 'config_test.herman_melville.moby_dick_or_the_whale.harper_1851.now_small_fowls_flew_screaming_over_the_yet_yawning_gulf_a_sullen_white_surf_beat_against_its_steep_sides_then_all_collapsed_and_the_great_shroud_of_the_sea_rolled_on_as_it_rolled_five_thousand_years_ago';
+    $message = 'Expected ConfigNameException was thrown for a name longer than Config::MAX_NAME_LENGTH.';
+    try {
+      $config = config($name);
+      $config->save();
+      $this->fail($message);
+    }
+    catch (ConfigNameException $e) {
+      $this->pass($message);
+    }
+
+    // Verify that a valid config object name can be saved.
+    $name = 'config.namespace';
+    $message = 'ConfigNameException was not thrown for a valid object name.';
+    try {
+      $config = config($name);
+      $config->save();
+      $this->pass($message);
+    }
+    catch (\Exception $e) {
+      $this->fail($message);
+    }
+  }
+
 }
diff --git a/core/modules/rest/config/rest.settings.yml b/core/modules/rest/config/rest.settings.yml
new file mode 100644
index 0000000..c9d1b12
--- /dev/null
+++ b/core/modules/rest/config/rest.settings.yml
@@ -0,0 +1 @@
+resources: { }
diff --git a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php
index c1a4d24..3036977 100644
--- a/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php
+++ b/core/modules/rest/lib/Drupal/rest/Tests/RESTTestBase.php
@@ -161,7 +161,7 @@ protected function entityValues($entity_type) {
    */
   protected function enableService($resource_type) {
     // Enable web API for this entity type.
-    $config = config('rest');
+    $config = config('rest.settings');
     if ($resource_type) {
       $config->set('resources', array(
         $resource_type => $resource_type,
diff --git a/core/modules/rest/rest.admin.inc b/core/modules/rest/rest.admin.inc
index 266a04e..8151cb8 100644
--- a/core/modules/rest/rest.admin.inc
+++ b/core/modules/rest/rest.admin.inc
@@ -26,7 +26,7 @@ function rest_admin_form($form, &$form_state) {
   }
   asort($entity_resources);
   asort($other_resources);
-  $enabled_resources = config('rest')->get('resources') ?: array();
+  $enabled_resources = config('rest.settings')->get('resources') ?: array();
 
   $form['entity_resources'] = array(
     '#type' => 'checkboxes',
@@ -55,7 +55,7 @@ function rest_admin_form_submit($form, &$form_state) {
     $resources += array_filter($form_state['values']['other_resources']);
   }
 
-  $config = config('rest');
+  $config = config('rest.settings');
   $config->set('resources', $resources);
   $config->save();
 
diff --git a/core/modules/rest/rest.module b/core/modules/rest/rest.module
index d008d16..fe90c28 100644
--- a/core/modules/rest/rest.module
+++ b/core/modules/rest/rest.module
@@ -30,7 +30,7 @@ function rest_permission() {
   $permissions = array();
   if (drupal_container()->has('plugin.manager.rest')) {
     $manager = drupal_container()->get('plugin.manager.rest');
-    $resources = config('rest')->get('resources');
+    $resources = config('rest.settings')->get('resources');
     if ($resources && $enabled = array_intersect_key($manager->getDefinitions(), $resources)) {
       foreach ($enabled as $key => $resource) {
         $plugin = $manager->getInstance(array('id' => $key));
