Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit 69a8c25

Browse files
author
Reini Urban
committed
perlcdelta: XSLoader security
1 parent c233ba0 commit 69a8c25

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

pod/perlcdelta.pod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,17 @@ I<< Note that the standard normal forms NFKD and NFKC ... return (in
170170
all views) incorrect results for strings containing these
171171
characters. >>
172172

173+
=head2 XSLoader relative paths with eval or #line
174+
175+
Upstream XSLoader 0.22 (perl 5.26) fixed a minor security problem with
176+
XSLoader within eval or with a #line directive, which can load a local
177+
relative shared library, which is not in C<@INC>. See
178+
L<[cpan #115808]|https://rt.cpan.org/Ticket/Display.html?id=115808>.
179+
180+
cperl XSLoader was already protected against the eval case since 5.22,
181+
when being rewritten in C. cperl-5.24.0 fixed now also ignoring a relative
182+
filename in a C<#line> directive, when the relative path is not in C<@INC>.
183+
173184
=head1 Modules and Pragmata
174185

175186
=head2 New Modules and Pragmata

pod/perldelta.pod

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,13 @@ Use cperl instead, see L<[cperl #166]|https://github.com/perl11/cperl/issues/166
22262226

22272227
=item *
22282228

2229+
XSLoader security problem with relative paths with eval/#line.
2230+
See L<[cpan #115808]|https://rt.cpan.org/Ticket/Display.html?id=115808>.
2231+
2232+
Not fixed in 5.24.1, only in cperl, XSLoader 0.22 on cpan and 5.26.
2233+
2234+
=item *
2235+
22292236
Methods on readonly packages cannot be called reliably. The method
22302237
cache check fails on them and not existing methods will not fall back
22312238
to the parent or UNIVERSAL or AUTOLOAD methods. Use cperl instead.

0 commit comments

Comments
 (0)