Package Details: netatalk 4.0.5-1

Git Clone URL: https://aur.archlinux.org/netatalk.git (read-only, click to copy)
Package Base: netatalk
Description: Open-source implementation of the Apple Filing Protocol
Upstream URL: https://netatalk.io
Keywords: afp apple mac macos
Licenses: GPL-2.0-or-later
Conflicts: netatalk-ddp, netatalk2
Submitter: Snowman
Maintainer: denn
Last Packager: denn
Votes: 99
Popularity: 0.22
First Submitted: 2007-03-31 06:19 (UTC)
Last Updated: 2024-11-10 20:38 (UTC)

Dependencies (26)

Required by (0)

Sources (1)

Pinned Comments

denn commented on 2024-10-07 09:59 (UTC) (edited on 2024-10-20 12:31 (UTC) by denn)

As version 4.0.0-1 switched to db5.3 as suggested by product documentation. This will make cnid_bdb to re-create all db files after upgrade.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 .. 25 Next › Last »

jac_cbi commented on 2022-05-27 15:09 (UTC)

With the patch more complete patch from FreeBSD (just more logging info, no other logic changes from first patch), I get the following logs:

May 27 10:58:49.152479 afpd[18141] {ad_open.c:1639} (error:ad): ad_entry_check_size overflow (122 + 32 > 0)
May 27 10:58:49.152605 afpd[18141] {ad_open.c:1655} (error:ad): ad_entry: not valid

So, it would appear that ad->valid_data_len is 0 prior to ad_entry_check_size() getting called. I don't know enough about the code to say wether that's normal or not. :-/

Anywho, here's the patch for curious:

--- libatalk/adouble/ad_open.c.orig     2022-05-26 17:51:48.604464910 -0400
+++ libatalk/adouble/ad_open.c  2022-05-27 10:51:33.467798497 -0400
@@ -1574,6 +1574,8 @@
     uint32_t required_len;

        if (eid >= ADEID_MAX) {
+               LOG(log_error, logtype_ad, "ad_entry_check_size %d is greater than %d",
+                   eid, ADEID_MAX);
                return false;
        }
        if (got_len == 0) {
@@ -1585,6 +1587,7 @@
                 * Shouldn't happen: implicitly initialized to zero because
                 * explicit initializer missing.
                 */
+               LOG(log_error, logtype_ad, "ad_entry_check_size explicit initializer missing");
                return false;
        }
        if (ad_checks[eid].expected_len == -1) {
@@ -1594,6 +1597,8 @@
        if (ad_checks[eid].fixed_size) {
                if (ad_checks[eid].expected_len != got_len) {
                        /* Wrong size fo fixed size entry. */
+                       LOG(log_error, logtype_ad, "ad_entry_check_size wrong size to fixed size entry (%d != %d)",
+                           ad_checks[eid].expected_len, got_len);
                        return false;
                }
         required_len = got_len;
@@ -1604,12 +1609,16 @@
                                 * Too small for variable sized entry with
                                 * minimum size.
                                 */
+                               LOG(log_error, logtype_ad, "ad_entry_check_size too small for variable sized entry (%d < %d)",
+                                   got_len, ad_checks[eid].expected_len);
                                return false;
                        }
         required_len = got_len;
                } else {
                        if (got_len > ad_checks[eid].expected_len) {
                                /* Too big for variable sized entry. */
+                               LOG(log_error, logtype_ad, "ad_entry_check_size too big for variable sized entry (%d > %d)",
+                                   got_len, ad_checks[eid].expected_len);
                                return false;
                        }
             /*
@@ -1621,10 +1630,14 @@
        }
        if (off + required_len < off) {
                /* wrap around */
+               LOG(log_error, logtype_ad, "ad_entry_check_size wrap around (%d + %d < %d)",
+                   off, required_len, off);
                return false;
        }
        if (off + required_len > bufsize) {
                /* overflow */
+               LOG(log_error, logtype_ad, "ad_entry_check_size overflow (%d + %d > %d)",
+                   off, required_len, bufsize);
                return false;
        }
        return true;
@@ -1639,10 +1652,7 @@

        valid = ad_entry_check_size(eid, bufsize, off, len);
        if (!valid) {
-               return NULL;
-       }
-
-       if (off == 0 || len == 0) {
+               LOG(log_error, logtype_ad, "ad_entry: not valid");
                return NULL;
        }

jac_cbi commented on 2022-05-26 22:03 (UTC) (edited on 2022-05-26 22:07 (UTC) by jac_cbi)

Took the gist from here:

https://cgit.freebsd.org/ports/commit/?id=ad0b2e636d9ebf0bdcfdb30933fa0658fa657b17 (last hunk is what is relevant)

--- libatalk/adouble/ad_open.c.orig     2022-05-26 17:51:48.604464910 -0400
+++ libatalk/adouble/ad_open.c  2022-05-26 17:53:32.887798244 -0400
@@ -1639,10 +1639,7 @@

        valid = ad_entry_check_size(eid, bufsize, off, len);
        if (!valid) {
-               return NULL;
-       }
-
-       if (off == 0 || len == 0) {
+               LOG(log_error, logtype_ad, "ad_entry: not valid");
                return NULL;
        }

EDIT: WIP. It built fine, and produced the log message, but it looks like I need to add more of the logging that the FreeBSD patch had

K4ib4 commented on 2022-05-21 15:41 (UTC)

Same problem on 3.1.13 - reverting back to 3.1.12-8 works fine.

krist commented on 2022-05-19 07:19 (UTC)

+1 on 3.1.13 crashing on login, successfully reverted back to 3.1.12-8 as well. It's already been reported to the netatalk bug tracker, too (https://sourceforge.net/p/netatalk/bugs/)

igno2k commented on 2022-05-14 17:39 (UTC)

Same here - reverting back to 3.1.12-8 works fine.

karog commented on 2022-05-09 16:39 (UTC) (edited on 2022-05-11 12:40 (UTC) by karog)

I upgraded from 3.1.12-8 (working) to 3.1.13-2 which installs and starts up ok on odroid n2 5.17.1-1-aarch64-ARCH. However when I try to do a Time Machine backup, it fails and I get the following stack trace in afpd.log:

May 11 08:35:09.701724 afpd[78059] {ad_open.c:794} (error:ad): ad_header_read_ea("/mnt/ssddata/tm"): invalid metadata EA

May 11 08:35:09.703791 afpd[78059] {ad_open.c:812} (error:ad): ad_header_read_ea("/mnt/ssddata/tm"): deleted invalid metadata EA

May 11 08:35:09.782380 afpd[78059] {ad_open.c:794} (error:ad): ad_header_read_ea("/mnt/ssddata/tm"): invalid metadata EA

May 11 08:35:09.782488 afpd[78059] {ad_open.c:812} (error:ad): ad_header_read_ea("/mnt/ssddata/tm"): deleted invalid metadata EA

May 11 08:35:09.783915 afpd[78059] {ad_open.c:794} (error:ad): ad_header_read_ea("/mnt/ssddata/tm/."): invalid metadata EA

May 11 08:35:09.783958 afpd[78059] {ad_open.c:812} (error:ad): ad_header_read_ea("/mnt/ssddata/tm/."): deleted invalid metadata EA

May 11 08:35:10.174750 afpd[78059] {fault.c:123} (severe:Default): ===============================================================

May 11 08:35:10.174826 afpd[78059] {fault.c:124} (severe:Default): INTERNAL ERROR: Signal 11 in pid 78059 (3.1.13)

May 11 08:35:10.174839 afpd[78059] {fault.c:125} (severe:Default): ===============================================================

May 11 08:35:10.177351 afpd[78059] {fault.c:96} (severe:Default): PANIC: internal error

May 11 08:35:10.177398 afpd[78059] {fault.c:97} (severe:Default): BACKTRACE: 12 stack frames:

May 11 08:35:10.177411 afpd[78059] {fault.c:103} (severe:Default): #0 /usr/lib/libatalk.so.18(netatalk_panic+0x44) [0xffffa0e8b2a4]

May 11 08:35:10.177434 afpd[78059] {fault.c:103} (severe:Default): #1 /usr/lib/libatalk.so.18(+0x3b408) [0xffffa0e8b408]

May 11 08:35:10.177446 afpd[78059] {fault.c:103} (severe:Default): #2 linux-vdso.so.1(__kernel_rt_sigreturn+0) [0xffffa11907dc]

May 11 08:35:10.177457 afpd[78059] {fault.c:103} (severe:Default): #3 /usr/lib/libatalk.so.18(+0x18184) [0xffffa0e68184]

May 11 08:35:10.177467 afpd[78059] {fault.c:103} (severe:Default): #4 /usr/lib/libatalk.so.18(ad_open+0x3e0) [0xffffa0e68ec4]

May 11 08:35:10.177477 afpd[78059] {fault.c:103} (severe:Default): #5 /usr/bin/afpd(+0x2e714) [0xaaaae052e714]

May 11 08:35:10.177487 afpd[78059] {fault.c:103} (severe:Default): #6 /usr/bin/afpd(+0x2f2e0) [0xaaaae052f2e0]

May 11 08:35:10.177497 afpd[78059] {fault.c:103} (severe:Default): #7 /usr/bin/afpd(afp_over_dsi+0x36c) [0xaaaae050d80c]

May 11 08:35:10.177507 afpd[78059] {fault.c:103} (severe:Default): #8 /usr/bin/afpd(main+0x978) [0xaaaae050b838]

May 11 08:35:10.177516 afpd[78059] {fault.c:103} (severe:Default): #9 /usr/lib/libc.so.6(+0x2b8fc) [0xffffa0cab8fc]

May 11 08:35:10.177526 afpd[78059] {fault.c:103} (severe:Default): #10 /usr/lib/libc.so.6(__libc_start_main+0xa0) [0xffffa0cab9d4]

May 11 08:35:10.177536 afpd[78059] {fault.c:103} (severe:Default): #11 /usr/bin/afpd(_start+0x30) [0xaaaae050bc70]

May 11 08:35:32.062869 afpd[78082] {auth.c:569} (error:AFPDaemon): afp_disconnect: primary reconnect failed

May 11 08:35:33.120390 afpd[78082] {dsi_stream.c:503} (error:DSI): dsi_stream_read: len:0, unexpected EOF

May 11 08:35:53.403021 afpd[78087] {auth.c:569} (error:AFPDaemon): afp_disconnect: primary reconnect failed

May 11 08:35:53.624786 afpd[78087] {dsi_stream.c:503} (error:DSI): dsi_stream_read: len:0, unexpected EOF

I reverted and it is working again.

naumovitch commented on 2022-05-08 22:28 (UTC)

Netatalk 3.1.13 is available!

sardo commented on 2021-11-19 22:57 (UTC)

[forehead slap] thanks. works now.

a821 commented on 2021-11-19 22:26 (UTC)

@sardo: just recompile netatalk against the new libldap library.

sardo commented on 2021-11-19 21:50 (UTC)

netatalk fails after libldap upgrade libldap-2.4.59-2 -> libldap-2.6.0-2

netatalk: error while loading shared libraries: libldap-2.4.so.2: cannot open shared object file: No such file or directory

lrwxrwxrwx 1 root root 18 Nov 13 11:37 /lib/libldap.so -> libldap.so.2.0.200 lrwxrwxrwx 1 root root 10 Nov 13 11:37 /lib/libldap.so.2 -> libldap.so -rwxr-xr-x 1 root root 384368 Nov 13 11:37 /lib/libldap.so.2.0.200*

downgrading libldap circumvents the issue.

lrwxrwxrwx 1 root root 21 Jul 18 15:59 /lib/libldap-2.4.so.2 -> libldap-2.4.so.2.11.7 -rwxr-xr-x 1 root root 318528 Jul 18 15:59 /lib/libldap-2.4.so.2.11.7 lrwxrwxrwx 1 root root 23 Jul 18 15:59 /lib/libldap_r-2.4.so.2 -> libldap_r-2.4.so.2.11.7 -rwxr-xr-x 1 root root 343168 Jul 18 15:59 /lib/libldap_r-2.4.so.2.11.7 lrwxrwxrwx 1 root root 23 Jul 18 15:59 /lib/libldap_r.so -> libldap_r-2.4.so.2.11.7 lrwxrwxrwx 1 root root 21 Jul 18 15:59 /lib/libldap.so -> libldap-2.4.so.2.11.7 lrwxrwxrwx 1 root root 10 Jul 18 15:59 /lib/libldap.so.2 -> libldap.so*