Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 22402)
+++ wp-includes/comment.php	(working copy)
@@ -2009,7 +2009,7 @@
  * @return object
  */
 function _close_comments_for_old_posts( $posts, $query ) {
-	if ( empty( $posts ) || ! $query->is_singular() || ! get_option( 'close_comments_for_old_posts' ) )
+	if ( empty( $posts ) || ! get_option( 'close_comments_for_old_posts' ) )
 		return $posts;
 
 	$post_types = apply_filters( 'close_comments_for_post_types', array( 'post' ) );
@@ -2020,10 +2020,12 @@
 	if ( ! $days_old )
 		return $posts;
 
-	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
-		$posts[0]->comment_status = 'closed';
-		$posts[0]->ping_status = 'closed';
-	}
+ 	for ( $i = 0; $i < count( $posts ); $i++ ) {
+ 		if ( time() - strtotime( $posts[ $i ]->post_date_gmt ) > ( $days_old * DAY_IN_SECONDS ) ) {
+ 			$posts[ $i ]->comment_status = 'closed';
+ 			$posts[ $i ]->ping_status    = 'closed';
+ 		}
+ 	}
 
 	return $posts;
 }
@@ -2060,3 +2062,58 @@
 
 	return $open;
 }
+
+/**
+ * Close comments/pings on attachments if the parent's comments are closed. Hooked to the_posts.
+ *
+ * @access private
+ * @since 3.6.0
+ *
+ * @param object $posts Post data object.
+ * @return object
+ */
+function _close_comments_for_attachments( $posts ) {
+
+	foreach ( (array) $posts as $key => $post ) {
+		if ( 'attachment' != $post->post_type || 0 == $post->post_parent || $post->post_parent == $post->ID )
+			continue;
+
+		$parent = get_post($post->post_parent);
+		$posts[ $key ]->comment_status = $parent->comment_status;
+		$posts[ $key ]->ping_status = $parent->ping_status;
+	}
+
+	return $posts;
+}
+
+/**
+ * Close comments/pings on attachment if parents comments/pings are closed.  Hooked to comments_open and pings_open.
+ *
+ * @access private
+ * @since 3.6.0
+ *
+ * @param bool $open Comments open or closed
+ * @param int $post_id Post ID
+ * @return bool $open
+ */
+function _close_comments_for_attachment( $open, $post_id) {
+	if ( ! $open )
+		return $open;
+
+	$post = get_post( $post_id );
+
+	if ( 'attachment' != $post->post_type || 0 == $post->post_parent )
+		return $open;
+
+	$parent = get_post( $post->post_parent );
+
+	if ( ! $parent )
+		return $open;
+
+	if ( 'comments_open' == current_filter() )
+		$open = ( 'open' == $parent->comment_status );
+	else //pings
+		$open = ( 'open' == $parent->ping_status );
+
+	return $open;
+}
\ No newline at end of file
Index: wp-includes/default-filters.php
===================================================================
--- wp-includes/default-filters.php	(revision 22402)
+++ wp-includes/default-filters.php	(working copy)
@@ -173,25 +173,28 @@
 add_filter( 'the_author',         'ent2ncr',      8 );
 
 // Misc filters
-add_filter( 'option_ping_sites',        'privacy_ping_filter'                 );
-add_filter( 'option_blog_charset',      '_wp_specialchars'                    ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
-add_filter( 'option_home',              '_config_wp_home'                     );
-add_filter( 'option_siteurl',           '_config_wp_siteurl'                  );
-add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                  );
-add_filter( 'pre_kses',                 'wp_pre_kses_less_than'               );
-add_filter( 'sanitize_title',           'sanitize_title_with_dashes',   10, 3 );
-add_action( 'check_comment_flood',      'check_comment_flood_db',       10, 3 );
-add_filter( 'comment_flood_filter',     'wp_throttle_comment_flood',    10, 3 );
-add_filter( 'pre_comment_content',      'wp_rel_nofollow',              15    );
-add_filter( 'comment_email',            'antispambot'                         );
-add_filter( 'option_tag_base',          '_wp_filter_taxonomy_base'            );
-add_filter( 'option_category_base',     '_wp_filter_taxonomy_base'            );
-add_filter( 'the_posts',                '_close_comments_for_old_posts', 10, 2);
-add_filter( 'comments_open',            '_close_comments_for_old_post', 10, 2 );
-add_filter( 'pings_open',               '_close_comments_for_old_post', 10, 2 );
-add_filter( 'editable_slug',            'urldecode'                           );
-add_filter( 'editable_slug',            'esc_textarea'                        );
-add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object'        );
+add_filter( 'option_ping_sites',        'privacy_ping_filter'                   );
+add_filter( 'option_blog_charset',      '_wp_specialchars'                      ); // IMPORTANT: This must not be wp_specialchars() or esc_html() or it'll cause an infinite loop
+add_filter( 'option_home',              '_config_wp_home'                       );
+add_filter( 'option_siteurl',           '_config_wp_siteurl'                    );
+add_filter( 'tiny_mce_before_init',     '_mce_set_direction'                    );
+add_filter( 'pre_kses',                 'wp_pre_kses_less_than'                 );
+add_filter( 'sanitize_title',           'sanitize_title_with_dashes',     10, 3 );
+add_action( 'check_comment_flood',      'check_comment_flood_db',         10, 3 );
+add_filter( 'comment_flood_filter',     'wp_throttle_comment_flood',      10, 3 );
+add_filter( 'pre_comment_content',      'wp_rel_nofollow',                15    );
+add_filter( 'comment_email',            'antispambot'                           );
+add_filter( 'option_tag_base',          '_wp_filter_taxonomy_base'              );
+add_filter( 'option_category_base',     '_wp_filter_taxonomy_base'              );
+add_filter( 'the_posts',                '_close_comments_for_old_posts',  10, 2 );
+add_filter( 'comments_open',            '_close_comments_for_old_post',   10, 2 );
+add_filter( 'pings_open',               '_close_comments_for_old_post',   10, 2 );
+add_filter( 'the_posts',                '_close_comments_for_attachments'       );
+add_filter( 'comments_open',            '_close_comments_for_attachment', 10, 2 );
+add_filter( 'pings_open',               '_close_comments_for_attachment', 10, 2 );
+add_filter( 'editable_slug',            'urldecode'                             );
+add_filter( 'editable_slug',            'esc_textarea'                          );
+add_filter( 'nav_menu_meta_box_object', '_wp_nav_menu_meta_box_object'          );
 
 // Actions
 add_action( 'wp_head',             'wp_enqueue_scripts',              1     );
