https://bugzilla.redhat.com/show_bug.cgi?id=2481434

            Bug ID: 2481434
           Summary: perl-RRD-Simple-1.44-53.fc45 FTBFS with
                    rrdtool-1.10.0-1.fc45: Some tests aborts with "buffer
                    overflow detected"
           Product: Fedora
           Version: 45
            Status: NEW
         Component: perl-RRD-Simple
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---
    Classification: Fedora



Some perl-RRD-Simple-1.44-53.fc45 tests crash after upgrading rrdtool from
1.9.0-11.fc45 to 1.10.0-1.fc45 (this one is pushed to dist-git, but the build
did not passed gating):

+ ./Build test
t/10pod.t .......................... ok
t/11pod_coverage.t ................. ok
t/20compile.t ...................... ok
*** buffer overflow detected ***: terminated
t/21synopsis.t ..................... 
Failed 2/7 subtests 
*** buffer overflow detected ***: terminated
t/21synopsis_old.t ................. 
Failed 2/7 subtests 
t/22last_value.t ................... ok
*** buffer overflow detected ***: terminated
t/23graph.t ........................ 
Failed 193/226 subtests 
t/24retention_period.t ............. ok
t/25info.t ......................... ok
t/26add_source.t ................... ok
t/27rename_source.t ................ ok
t/28heartbeat.t .................... ok
t/29on_missing_ds.t ................ ok
t/30assume_rrd_filename.t .......... ok
t/31create_assume_rrd_filename.t ... ok
*** buffer overflow detected ***: terminated
t/32exported_function_interface.t .. 
Failed 5/12 subtests 
        (less 1 skipped subtest: 6 okay)
t/33correct_spelling.t ............. ok
t/34populate_test_data.t ........... ok
t/35average_hrule.t ................ skipped: RRDs version less than 1.2
t/36no_sources.t ................... skipped: RRDs version less than 1.2
Test Summary Report
-------------------
t/21synopsis.t                   (Wstat: 134 (Signal: ABRT, dumped core) Tests:
5 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 7 tests but ran 5.
t/21synopsis_old.t               (Wstat: 134 (Signal: ABRT, dumped core) Tests:
5 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 7 tests but ran 5.
t/23graph.t                      (Wstat: 134 (Signal: ABRT, dumped core) Tests:
33 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 226 tests but ran 33.
t/32exported_function_interface.t (Wstat: 134 (Signal: ABRT, dumped core)
Tests: 7 Failed: 0)
  Non-zero wait status: 134
  Parse errors: Bad plan.  You planned 12 tests but ran 7.

An example with t/21synopsis.t:

$ valgrind -- perl -Ilib t/21synopsis.t 
==3822== Memcheck, a memory error detector
==3822== Copyright (C) 2002-2026, and GNU GPL'd, by Julian Seward et al.
==3822== Using Valgrind-3.27.1 and LibVEX; rerun with -h for copyright info
==3822== Command: perl -Ilib t/21synopsis.t
==3822== 
1..7
ok 1 - new
ok 2 - create
ok 3 - update
ok 4 - last
ok 5 - sources
*** buffer overflow detected ***: terminated
==3822== 
==3822== Process terminating with default action of signal 6 (SIGABRT): dumping
core
==3822==    at 0x4D27E9C: __pthread_kill_implementation (pthread_kill.c:44)
==3822==    by 0x4CCCECD: raise (raise.c:26)
==3822==    by 0x4CB4432: abort (abort.c:77)
==3822==    by 0x4CB5483: __libc_message_impl.cold (libc_fatal.c:138)
==3822==    by 0x4DB564F: __libc_message_wrapper (stdio.h:203)
==3822==    by 0x4DB564F: __fortify_fail (fortify_fail.c:24)
==3822==    by 0x4DB4FE3: __chk_fail (chk_fail.c:28)
==3822==    by 0x4DB6ABA: __strcat_chk (strcat_chk.c:34)
==3822==    by 0x66D0C56: strcat (string_fortified.h:152)
==3822==    by 0x66D0C56: checkUnusedValues (rrd_graph_helper.c:148)
==3822==    by 0x66D0C56: rrd_graph_script (rrd_graph_helper.c:2075)
==3822==    by 0x66C3A41: rrd_graph_v (rrd_graph.c:4740)
==3822==    by 0x66C823A: rrd_graph (rrd_graph.c:4635)
==3822==    by 0x668B86A: XS_RRDs_graph (RRDs.xs:407)
==3822==    by 0x494DB80: Perl_rpp_invoke_xs (inline.h:1176)
==3822==    by 0x494DB80: Perl_pp_entersub (pp_hot.c:6558)

I posted a fix for rrdtool to upstream
<https://github.com/oetiker/rrdtool-1.x/pull/1329>, then the tests fail with
rrdtool-1.10.3 like this:

$  /usr/bin/perl -Ilib t/21synopsis.t 
1..7
ok 1 - new
ok 2 - create
ok 3 - update
ok 4 - last
ok 5 - sources
Unused Arguments " Tue 26/May/2026 12:36:49 CEST\r:" in command : COMMENT:Graph
last updated: Tue 26/May/2026 12:36:49 CEST\r at t/21synopsis.t line 49.
# Looks like your test exited with 255 just after 5.

That's because RRD::Simple::_create_graph() forgets to escape colon characters.
It does:

        if ($timestamp eq 'graph' || $timestamp eq 'both') {
            my $time = sprintf('Graph last updated: %s\r',
                            strftime($timefmt,localtime(time))
                        );
            $time =~ s/:/\\:/g if $RRDs::VERSION >= 1.2; # Only escape for 1.2
            push @cmd, "COMMENT:$time";
        }

but with rrdtool-1.10.3 the $RRDs::VERSION variable is 1.10003 which is lower
than 1.2. It reported it to rrdtool upstream in
<https://github.com/oetiker/rrdtool-1.x/issues/1330>.

I believe that in Fedora, we should remove the "if $RRDs::VERSION >= 1.2"
condition from perl-RRD-Simple code and move it on the RPM level as a minimal
version.


-- 
You are receiving this mail because:
You are on the CC list for the bug.
https://bugzilla.redhat.com/show_bug.cgi?id=2481434

Report this comment as SPAM: 
https://bugzilla.redhat.com/enter_bug.cgi?product=Bugzilla&format=report-spam&short_desc=Report%20of%20Bug%202481434%23c0

-- 
_______________________________________________
perl-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to