-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zvol_id failing on gentoo (probably other distributions who build with stack protection) #569
Comments
Would you post your "emerge --info"? |
|
@Peitolm Can you try the following patch, behlendorf/zfs@74468a3 . It does a little restructuring/clean up to the |
Sadly still having some problems,
|
No problem, I'll try to find a little time to run the helper under Valgrind and make sure everything works properly. |
Posted a pull request (#775) that corrects this on RHEL/CentOS and I'm assuming other distro's using stack protection. Its a kludge but it works in my environments (so far) will also try make some time to Valgrind the code but can't make any promises on that one. |
This is not a proper fix. It is just a workaround for the stack smashing detected by gcc in zvol_id. We simply disable the gcc stack protector for now when building the zvol_id udev helper. Once the root cause is resolved this patch should be reverted. Signed-off-by: Brian Behlendorf <[email protected]> Issues openzfs#569
The previous implementation of zvol_id suffered from a possible buffer overflow. When appending the '-part' partition informtation it was possible to overrun the provided buffer. This issue was resolved by dynamically allocating a buffer of the correct length using asprintf(). Additionally, since this was such a straight forward little program I took the opportunity to restructure the code. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#569
+ crashes on 64bit kernel with 32bit userland.
@behlendorf #775 did fix this. |
@ryao thanks. It looks like there is still some room for improvement here but the basic issue has been resolved. Closing. |
Remove the code that doesn't make any sense. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Chunwei Chen <[email protected]> Closes openzfs#569
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Signed-off-by: Ahelenia Ziemiańska <[email protected]>
#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
openzfs#569 was opened in 2012 and closed in 2015; if the issue was still there we'd presumably've seen it? Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#13316
/lib/udev/zvol_id /dev/zd0
*** stack smashing detected ***: zvol_id - terminated
zvol_id: stack smashing attack in function - terminated
Report to http://bugs.gentoo.org/
Killed
added -fno-stack-protector to the compile line for zvol_id and it compiles and works,
/lib/udev/zvol_id /dev/zd0
tank/volume
The text was updated successfully, but these errors were encountered: