Skip to content
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

ad: segfault when modifying files on volume owned by other user #2024

Open
rdmark opened this issue Mar 15, 2025 · 0 comments
Open

ad: segfault when modifying files on volume owned by other user #2024

rdmark opened this issue Mar 15, 2025 · 0 comments

Comments

@rdmark
Copy link
Member

rdmark commented Mar 15, 2025

If you run ad cp or ad mv (etc.) on a file on a shared volume where the user running ad is also the owner of the dir/files on the shared volume, the operations succeed without issue.

However, if the dir/files are owned by another user, ad throws a segfault.

This is not a new bug. I could reproduce as far back as 3.1.12.

dmark@pretrix:/srv/afptest1$ ad cp 1 11
Mar 15 15:13:05.099331 ad[125273] {netatalk_conf.c:2024} (error:Default): getvolbypath("/srv/afptest1/11"): path does not match basedir regex "/home"
Mar 15 15:13:05.099435 ad[125273] {netatalk_conf.c:2024} (error:Default): getvolbypath("/srv/afptest1/1"): path does not match basedir regex "/home"
Segmentation fault

Sample backtrace

Program received signal SIGSEGV, Segmentation fault.
copy (path=0xaaaaaaaca850 "README", statp=0xffffffffc6d0, tflag=0, ftw=0xffffffffc778) at ../bin/ad/ad_cp.c:376
376	    if (!dvolume.vol->vfs->vfs_validupath(dvolume.vol, dir))
(gdb) bt
#0  copy (path=0xaaaaaaaca850 "README", statp=0xffffffffc6d0, tflag=0, ftw=0xffffffffc778) at ../bin/ad/ad_cp.c:376
#1  0x0000fffff7f4dea8 in ftw_startup (dir=0xfffffffff6ff "README", is_nftw=1, func=0xaaaaaaaa3694 <copy>, 
    up=0xaaaaaaaa2d28 <upfunc>, descriptors=20, flags=19) at ../libatalk/util/ftw.c:817
#2  0x0000fffff7f4dfc4 in nftw (path=0xfffffffff6ff "README", func=0xaaaaaaaa3694 <copy>, up=0xaaaaaaaa2d28 <upfunc>, 
    descriptors=20, flags=19) at ../libatalk/util/ftw.c:862
#3  0x0000aaaaaaaa35d4 in ad_cp (argc=1, argv=0xfffffffff498, obj=0xffffffffc990) at ../bin/ad/ad_cp.c:338
#4  0x0000aaaaaaaaa568 in main (argc=4, argv=0xfffffffff488) at ../bin/ad/ad.c:68
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant