RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1068798 - rlm_perl attribute values truncated
Summary: rlm_perl attribute values truncated
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freeradius
Version: 7.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: John Dennis
QA Contact: David Spurek
URL:
Whiteboard:
Depends On: 1068795
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-21 22:14 UTC by John Dennis
Modified: 2019-03-06 02:36 UTC (History)
7 users (show)

Fixed In Version: freeradius-3.0.1-5.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1068795
Environment:
Last Closed: 2014-06-13 10:48:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Dennis 2014-02-21 22:14:35 UTC
+++ This bug was initially created as a clone of Bug #1068795 +++

Attribute values passed into rlm_perl are truncated.

rad_recv: Access-Request packet from host 127.0.0.1 port 43312, id=164, length=77
	User-Name = 'baduser'
	User-Password = 'password'
	NAS-IP-Address = 127.0.0.1
	NAS-Port = 0
	Message-Authenticator = 0xe2fd6fe6902a551f5dcb8e603b6d981d

rlm_perl: RAD_REQUEST: User-Name = badu
rlm_perl: RAD_REQUEST: User-Password = pass
rlm_perl: RAD_REQUEST: NAS-Port = 0
rlm_perl: RAD_REQUEST: NAS-IP-Address = 127.0.0.1
rlm_perl: RAD_REQUEST: Message-Authenticator = xe2fd6fe6902a551f5dcb8e603b6d981d


The string values are truncated to 4 characters.

--- Additional comment from John Dennis on 2014-02-21 17:13:55 EST ---

in src/lib/print.c the vp_prints_value function is defined like this:

size_t vp_prints_value(char *out, size_t outlen, VALUE_PAIR const *vp, int8_t quote)

which at some point does this:

return fr_print_string(vp->vp_strvalue, vp->length, out, sizeof(out));

Note the length field of fr_print_string is passed as sizeof(out),
but out is a pointer, on a system whose pointers are 4 bytes the maximum
string emitted will be 4 characters.

The correct length to pass is the outlen parameter.

Comment 7 Ludek Smid 2014-06-13 10:48:38 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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