Critical Vulnerabilities in Samba
Critical Vulnerabilities in Samba
Posted May 18, 2007 8:15 UTC (Fri) by xoddam (subscriber, #2322)In reply to: Critical Vulnerabilities in Samba by jwb
Parent article: Critical Vulnerabilities in Samba
> I've always heard that memory allocations never fail on Linux
Depends entirely how you allocate the memory! The standard malloc() in
glibc will rarely fail, large allocations result in new anonymous and
unallocated pages supplied by mmap(), but it *is* possible to run out of
virtual memory space for new allocations in a long-running daemon,
especially if it has many threads (which fragment the vm space).
On the other hand many applications use alternative allocators that are
more likely to return NULL. It is possible to refuse to overcommit memory
in the kernel, and to try to impose a realistic maximum heap size in
glibc.
> there are no practical ways to handle failed memory allocation.
A good system is designed robustly enough to cope with failure. In a
network daemon dropping packets or closing connections once in a while is
just fine; performance will suffer but nothing ought to break.
