jpeg data prints in smbldap-usershow, corrupts terminal, security risk

Bug #141084 reported by Rubin
2
Affects Status Importance Assigned to Milestone
smbldap-tools (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Binary package hint: smbldap-tools

smbldap-usershow prints out all the attributes attached to that user. Some attributes however, may be binary data, such as JPG image of the individual. Further, at our site, the jpg files are uploaded by the user, and could in theory have specally crafted text targetting xterm to cause a security breach. (Not to mention, it blows away the terminal requiring a reset).

The fix to this is to check each attribute for non-printable charactors, and replace it with a string such as **UNPRINTABLE** if any are found.

(See the following patch)

--- smbldap-tools-0.9.4/smbldap_tools.pm 2007-09-17 06:05:48.000000000 -0500
+++ smbldap-tools-0.9.4-rubin-1/smbldap_tools.pm 2007-09-19 15:57:46.446805000 -0500
@@ -773,13 +773,15 @@

     $mesg->code && die $mesg->error;
     foreach my $entry ($mesg->all_entries) {
        $lines.= "dn: " . $entry->dn."\n";
        foreach my $attr ($entry->attributes) {
- {
- $lines.= $attr.": ".join(',', $entry->get_value($attr))."\n";
+ my @vals = $entry->get_value($attr);
+ foreach my $val (@vals) {
+ $val="**UNPRINTABLE**" if ( $val =~ /[^[:print:]]/ );
            }
+ $lines.= $attr.": ".join(',', @vals)."\n";
        }
     }
     chomp $lines;
     if ($lines eq '') {
        return undef;

Tags: patch
Revision history for this message
Daniel T Chen (crimsun) wrote :

Is this symptom still reproducible in 8.10 RC or later?

Changed in smbldap-tools:
importance: Undecided → Wishlist
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in smbldap-tools:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.