Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 740503

Summary: [SCTP] Permission denied on a established socket via root
Product: Red Hat Enterprise Linux 6 Reporter: Hangbin Liu <haliu>
Component: kernelAssignee: Thomas Graf <tgraf>
Status: CLOSED DUPLICATE QA Contact: Network QE <network-qe>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2CC: guest027, nhorman, rkhan
Target Milestone: alpha   
Target Release: 6.3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-14 07:24:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
reproducer none

Description Hangbin Liu 2011-09-22 09:22:23 UTC
Created attachment 524362 [details]
reproducer

Description of problem:

When run SCTP LTP test cases as the regression test. Some tests were
failed. When run LTP SCPT test_1_to_1_accept_close.c test5, we got a
"Permission denied" on the last RHEL6.2 kernel even use root. But we can
got a "Invalid argument" on RHEL6.0 with normal user. 

----- LTP SCTP test_1_to_1_accept_close.c Test 5 ----------

/*Calling accept to establish the connection*/
acpt_sk = test_accept(lstn_sk, (struct sockaddr *) &acpt_addr, &len);

/*accept() TEST5: On a established socket EINVAL, Expected error*/
error = accept(acpt_sk, (struct sockaddr *) &acpt_addr, &len);
if (error != -1 || errno != EINVAL)
        tst_brkm(TBROK, NULL, "accept on an established socket"
                     "error:%d, errno:%d", error, errno);

tst_resm(TPASS, "accept() on an established socket - EINVAL");

/*Closing the previously established association*/
close(acpt_sk);


Version-Release number of selected component (if applicable):

RHEL6.2

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 2 RHEL Program Management 2011-10-07 15:49:26 UTC
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.

Comment 3 Jia Ma 2011-10-09 03:21:24 UTC
That should be the error message for the "second accept", it's a invalid accept itself, right? I think the different messages(compare with 6.0) were related to some kernel changes, you know the perror output would not that accurate sometimes.

Comment 4 Jia Ma 2011-10-09 03:21:34 UTC
That should be the error message for the "second accept", it's a invalid accept itself, right? I think the different messages(compare with 6.0) were related to some kernel changes, you know the perror output would not that accurate sometimes.

Comment 5 Thomas Graf 2011-10-25 11:00:22 UTC
It must be selinux that returns -EPERM in this case, the SCTP accept code looks
correct:

SCTP_STATIC struct sock *sctp_accept(struct sock *sk, int flags, int *err)
{
        [...]

	if (!sctp_sstate(sk, LISTENING)) {
		error = -EINVAL;
		goto out;
	}

Comment 8 Hangbin Liu 2011-12-14 07:24:42 UTC

*** This bug has been marked as a duplicate of bug 715518 ***