Bug 1038676
Summary: | execve does not return E2BIG for long parameters (broken Ruby test suite) | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Vít Ondruch <vondruch> | ||||||
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | unspecified | ||||||||
Version: | 22 | CC: | falonso, gansalmon, itamar, jcapik, jonathan, kernel-maint, kmcmartin, madhu.chinakonda | ||||||
Target Milestone: | --- | Keywords: | SecurityTracking | ||||||
Target Release: | --- | ||||||||
Hardware: | aarch64 | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | fst_owner=falonsoe | ||||||||
Fixed In Version: | Doc Type: | Release Note | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1052186 (view as bug list) | Environment: | |||||||
Last Closed: | 2015-03-25 12:31:45 UTC | Type: | Bug | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 1052186 | ||||||||
Attachments: |
|
Description
Vít Ondruch
2013-12-05 15:43:16 UTC
I just tried to reproduce the issue and it seems it doesn't matter what the agrument length is .... the execve command simply doesn't work even when short arguments are passed. Sorry for confusion .... it seem we were both wrong. We didn't call the execve command correctly in our reproducer. I fixed the reproducer and the ENOENT disappeared. Anyway it's still buggy. Instead of returning E2BIG, the first argument argv[1] is truncated to 131072 bytes (=128kB) and concatenated with argv[0] so that the length is 131072 + strlen(argv[0]). Strange, isn't it. Even funnier the behaviour is when trying that with 2 arguments ... I'm going to attach the results ... Created attachment 849480 [details]
long-param.tgz
This attachment contains a reproducer written in C. Just adjust the SIZE definition in 'long-param-test.c', type 'make' and then redirect output of the 'long-param-test' tool to a text file.
Created attachment 849495 [details]
long-param.tgz
... sorry ... ignore the previous attachment ... here's the right one ...
The arguments are correctly passed to the INLINE_SYSCALL (execve, 3, file, argv, envp); Even the following glibc call is still ok ... INTERNAL_SYSCALL_RAW(11, , 3, "myecho", newargv, newenviron); I believe all the koji builders have now been updated to fix this. Kyle, thanks for looking into this. Jaromír, could you please check this, so we can resolve this issue? Thanks The testing application now correctly accepts up to 1015796 characters per argument. Longer arguments are rejected with errno=7 (Argument list too long). The error message is a bit misleading, but the behaviour is ok now. Tested with : kernel-3.16.0-0.42.sa2.aarch64 This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle. Changing version to '22'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22 |