[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/55190: A bogus error message can be reported by kadmin
>Synopsis: A bogus error message can be reported by kadmin
>Arrival-Date: Tue Apr 21 03:45:00 +0000 2020
>Originator: Duncan McEwan
>Release: NetBSD 8.1_STABLE
School of Engineering and Computer Science,
Victoria University of Wellington
System: NetBSD krb1.ecs.vuw.ac.nz 8.1_STABLE NetBSD 8.1_STABLE (GENERIC) #4: Sun Jan 12 17:21:45 NZDT 2020 mark%turakirae.ecs.vuw.ac.nz@localhost:/local/SAVE/8_64.obj/src/work/8/src/sys/arch/amd64/compile/GENERIC amd64
kadmin sometimes reports the error message "sl_loop: out of memory"
when the problem has nothing to do with running out of memory.
This is tangentially related to PR #55145, in that the bug reported
in that PR can trigger the above misleading error message. But
the message can also be produced independently of that bug.
For eg: Attempt to set a password ending with a '"' character.
kdc# kadmin -l
kadmin> cpw --password=asdfdf" duncan
sl_loop: out of memory
In the above example the problem isn't that kadmin ran out of
memory. It just didn't like the unescaped single '"' character.
The problem is caused by this code in sl.c in the function
ret = sl_make_argv(buf, &argc, &argv);
fprintf(stderr, "sl_loop: out of memory\n");
But sl_make_argv() doesn't only fail with ENOMEM. For other parsing
errors it returns ERANGE ("Result too large or too small").
This would hardly be an ideal error message either. But if the error
return from sl_make_argv() is constrained to be a UNIX errno there
probably isn't an great option. Perhaps EINVAL might be better?
Main Index |
Thread Index |