Bug 788194 - Various minor bugs
Summary: Various minor bugs
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: scl-utils
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-07 17:09 UTC by Miloslav Trmač
Modified: 2013-07-02 23:54 UTC (History)
5 users (show)

Fixed In Version: scl-utils-20120209-1.el6
Clone Of:
Environment:
Last Closed: 2012-02-09 07:48:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miloslav Trmač 2012-02-07 17:09:45 UTC
With scl-utils-20111214-1.fc16:

1. 
> $ perl -e 'print "A"x65535' | valgrind ./scl -
> ==8187== Memcheck, a memory error detector
> ==8187== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
> ==8187== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
> ==8187== Command: ./scl -
> ==8187== 
> ==8187== Syscall param read(buf) points to unaddressable byte(s)
> ==8187==    at 0x35C58E26D0: __read_nocancel (in /lib64/libc-2.14.90.so)
> ==8187==    by 0x35C5878B41: _IO_file_xsgetn (in /lib64/libc-2.14.90.so)
> ==8187==    by 0x35C586CFE2: fread (in /lib64/libc-2.14.90.so)
> ==8187==    by 0x400B48: ??? (in /home/mitr/scl)
> ==8187==    by 0x35C582169C: (below main) (in /lib64/libc-2.14.90.so)
> ==8187==  Address 0x4c2c080 is 0 bytes after a block of size 8,192 alloc'd
> ==8187==    at 0x4A075B2: realloc (vg_replace_malloc.c:525)
> ==8187==    by 0x400B22: ??? (in /home/mitr/scl)
> ==8187==    by 0x35C582169C: (below main) (in /lib64/libc-2.14.90.so)

(Probably no security impact.)

Cause:
> for (;(r += fread(cmd+r, 1, BUFSIZ, stdin));) {
...
>     cmd = realloc(cmd, r);

needs to allocate BUFSIZ more to allow for the fread() in next iteration.


2.
> $ echo | valgrind ./scl -
> ==8257== Memcheck, a memory error detector
> ==8257== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
> ==8257== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
> ==8257== Command: ./scl -
> ==8257== 
> ==8257== Conditional jump or move depends on uninitialised value(s)
> ==8257==    at 0x4A07DB8: strlen (mc_replace_strmem.c:282)
> ==8257==    by 0x4010CA: ??? (in /home/mitr/scl)
> ==8257==    by 0x400D9A: ??? (in /home/mitr/scl)
> ==8257==    by 0x35C582169C: (below main) (in /lib64/libc-2.14.90.so)
> ==8257== 
> /var/tmp/sclhVZ8Gm: řádek 1: chyba syntaxe poblíž neočekávaného tokenu „null“
> /var/tmp/sclhVZ8Gm: řádek 1: `scl_enabled (null)'

Cause: argc not checked if (stdin_read)


3.
Nothing removes "tmp" (/var/tmp/sclXXX)

Comment 1 Miloslav Trmač 2012-02-07 17:15:26 UTC
4. I can't see what the start of the "tmp" script does.
1) it is testing presence of, and adding, argv[2], to SCLS - i.e. "action", not names of any of the SCLs.

2) Even if it did test the enabled status of the required SCLs, it would just exit if the SCL is already enabled instead of performing the required command.

Comment 2 Jindrich Novy 2012-02-09 07:48:56 UTC
Thanks, the main minor bugs noted in the bug report are now addressed.

(In reply to comment #1)
> 4. I can't see what the start of the "tmp" script does.
> 1) it is testing presence of, and adding, argv[2], to SCLS - i.e. "action", not
> names of any of the SCLs.

Nope, argv[2] is a collection name.

> 
> 2) Even if it did test the enabled status of the required SCLs, it would just
> exit if the SCL is already enabled instead of performing the required command.

It is on purpose: One is not permitted to enable two SCLs twice. In any case it should just run the command without updating the enabled SCL list. So from now on it will behave like this.

Comment 3 Fedora Update System 2012-02-13 10:19:27 UTC
scl-utils-20120209-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/scl-utils-20120209-1.fc16

Comment 4 Fedora Update System 2012-02-13 10:23:34 UTC
scl-utils-20120209-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/scl-utils-20120209-1.fc15

Comment 5 Fedora Update System 2012-02-13 10:26:17 UTC
scl-utils-20120209-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/scl-utils-20120209-1.el6

Comment 6 Fedora Update System 2012-02-13 10:27:25 UTC
scl-utils-20120209-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/scl-utils-20120209-1.el5

Comment 7 Fedora Update System 2012-02-22 01:59:20 UTC
scl-utils-20120209-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2012-02-22 01:59:43 UTC
scl-utils-20120209-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2012-02-28 21:01:57 UTC
scl-utils-20120209-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2012-02-28 21:02:17 UTC
scl-utils-20120209-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.