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 823625 - cifs: fix handling of scopeid in cifs_convert_address
Summary: cifs: fix handling of scopeid in cifs_convert_address
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Sachin Prabhu
QA Contact: Jian Li
URL:
Whiteboard:
Depends On:
Blocks: 798385
TreeView+ depends on / blocked
 
Reported: 2012-05-21 18:00 UTC by Sachin Prabhu
Modified: 2014-03-04 00:08 UTC (History)
5 users (show)

Fixed In Version: kernel-2.6.32-298.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-21 05:56:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0496 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6 kernel update 2013-02-20 21:40:54 UTC

Description Sachin Prabhu 2012-05-21 18:00:20 UTC
Fix handling of scopeid in cifs_convert_address


Backport of the following upstream patches
--
commit 9616125611ee47693186533d76e403856a36b3c8
Author: Jeff Layton <jlayton>
Date:   Wed Feb 16 09:34:16 2011 -0500

cifs: fix handling of scopeid in cifs_convert_address

The code finds, the '%' sign in an ipv6 address and copies that to a
buffer allocated on the stack. It then ignores that buffer, and passes
'pct' to simple_strtoul(), which doesn't work right because we're
comparing 'endp' against a completely different string.

Fix it by passing the correct pointer. While we're at it, this is a
good candidate for conversion to strict_strtoul as well.

Cc: stable
Cc: David Howells <dhowells>
Reported-by: Björn JACKE <bj>
Signed-off-by: Jeff Layton <jlayton>
Signed-off-by: Steve French <sfrench.com>
--

--
commit 2545e0720a5a4bf8ebccc6f793f97a246cf3f18d
Author: Dan Carpenter <dan.carpenter>
Date:   Thu Mar 1 10:06:52 2012 +0300

cifs: writing past end of struct in cifs_convert_address()

"s6->sin6_scope_id" is an int bits but strict_strtoul() writes a
long
so this can corrupt memory on 64 bit systems.

Signed-off-by: Dan Carpenter <dan.carpenter>
Reviewed-by: Jeff Layton <jlayton>
Signed-off-by: Steve French <sfrench.com>
--

Comment 1 RHEL Program Management 2012-07-10 08:00:22 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 2 RHEL Program Management 2012-07-10 23:43:05 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 4 RHEL Program Management 2012-07-27 16:21:27 UTC
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Product
Management has requested further review of this request by
Red Hat Engineering, for potential inclusion in a Red Hat
Enterprise Linux release for currently deployed products.
This request is not yet committed for inclusion in a release.

Comment 6 Jarod Wilson 2012-08-16 21:22:00 UTC
Patch(es) available on kernel-2.6.32-298.el6

Comment 9 Jian Li 2013-02-04 10:11:09 UTC
This bug is verified!

#reproducer
[root@ibm-x3550m3-06 ~]# mount.cifs //::1/public /mnt/test -o user=root,password=hongmao,ip=::1%5 -vvv
ip address ::1%5 override specified
mount.cifs kernel mount options: ip=::1%5,unc=\\::1\public,,ver=1,user=root,pass=********
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@ibm-x3550m3-06 ~]# dmesg
fs/cifs/cifsfs.c: Devname: //::1/public/ flags: 0 
fs/cifs/connect.c: CIFS VFS: in cifs_mount as Xid: 1 with uid: 0
fs/cifs/connect.c: Username: root
fs/cifs/connect.c: UNC: \\::1\public ip: ::1%5
fs/cifs/connect.c: CIFS VFS: leaving cifs_mount (xid = 1) rc = -22
CIFS VFS: cifs_mount failed w/return code = -22

#verifying
[root@ibm-x3550m3-06 ~]# mount.cifs //::1/public /mnt/test -o user=root,password=hongmao,ip=::1%5 -vvv
ip address ::1%5 override specified
mount.cifs kernel mount options: ip=::1%5,unc=\\::1\public,,ver=1,user=root,pass=********
[root@ibm-x3550m3-06 ~]# grep "/mnt/test" /proc/mounts
//::1/public/ /mnt/test cifs rw,relatime,sec=ntlm,cache=loose,unc=\\::1\public,username=root,uid=0,noforceuid,gid=0,noforcegid,addr=0000:0000:0000:0000:0000:0000:0000:0001%5,unix,posixpaths,serverino,acl,rsize=16384,wsize=65536,actimeo=1 0 0
[root@ibm-x3550m3-06 ~]# uname -a
Linux ibm-x3550m3-06.rhts.eng.nay.redhat.com 2.6.32-358.el6.x86_64 #1 SMP Tue Jan 29 11:47:41 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

Comment 11 errata-xmlrpc 2013-02-21 05:56:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0496.html


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