Bug#661548: libyaml-libyaml-perl: FTBFS with hardening flags enabled: -Werror=format-security
Dominic Hargreaves
dom at earth.li
Mon Feb 27 21:44:42 UTC 2012
Source: libyaml-libyaml-perl
Severity: normal
Version: 0.38-1
User: debian-qa at lists.debian.org
Usertags: hardening-format-security hardening
With hardening flags enabled, this package FTBFS:
perl_libyaml.c: In function 'Load':
perl_libyaml.c:191:5: error: format not a string literal and no format arguments [-Werror=format-security]
perl_libyaml.c: In function 'load_node':
perl_libyaml.c:274:9: error: format not a string literal and no format arguments [-Werror=format-security]
perl_libyaml.c: In function 'load_mapping':
perl_libyaml.c:318:9: error: format not a string literal and no format arguments [-Werror=format-security]
perl_libyaml.c: In function 'load_sequence':
perl_libyaml.c:351:9: error: format not a string literal and no format arguments [-Werror=format-security]
cc1: some warnings being treated as errors
(this is the first error of this type seen: it's possible that there
could be others once this is fixed).
A likely fix is to change croak(var) to croak("%s", var)[1], or similar.
Note that I haven't verified whether an externally-controlled string is
used; if so, it would be appropriate to upgrade this bug RC severity
with the security tag[2].
This was found during testing of perl 5.14.2-8 in experimental; however,
since that version was prepared, it has been decided not to export
those build flags in Config_heay.pl. Nevertheless, it is likely that at
some point, either in debhelper 9 or 10, the hardening flags will be
enabled for all perl modules.
Thanks,
Dominic.
[1] <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657853#92>
[2] <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657853#117>
--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
More information about the pkg-perl-maintainers
mailing list