Index: wp-includes/comment.php
===================================================================
--- wp-includes/comment.php	(revision 10333)
+++ wp-includes/comment.php	(working copy)
@@ -1580,16 +1591,19 @@
  * @return object
  */
 function _close_comments_for_old_posts( $posts ) {
-	if ( empty($posts) || !is_singular() || !get_option('close_comments_for_old_posts') )
+	if ( empty($posts) || !get_option('close_comments_for_old_posts') )
 		return $posts;
 
 	$days_old = (int) get_option('close_comments_days_old');
 	if ( !$days_old )
 		return $posts;
 
-	if ( time() - strtotime( $posts[0]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) {
-		$posts[0]->comment_status = 'closed';
-		$posts[0]->ping_status = 'closed';
+	$num_posts = count($posts);
+	for ( $i = 0; $i < $num_posts; $i++) {
+		if ( time() - strtotime( $posts[$i]->post_date_gmt ) > ( $days_old * 24 * 60 * 60 ) ) {
+			$posts[$i]->comment_status = 'closed';
+			$posts[$i]->ping_status = 'closed';
+		}
 	}
 
 	return $posts;
@@ -1624,4 +1638,58 @@
 	return $open;
 }
 
-?>
+/**
+ * Close comments/pings on attachments if the parent's comments are closed.  Hooked to the_posts.
+ *
+ * @access private
+ * @since 2.8.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 2.8.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 10333)
+++ wp-includes/default-filters.php	(working copy)
@@ -158,6 +158,9 @@
 add_filter( 'the_posts', '_close_comments_for_old_posts' );
 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' );
 
 // Atom SSL support
