| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid reading pass the end of the source buffer when it is not NUL
terminated.
If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.
PR: 206178
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
Requested by: danfe
Notes:
svn path=/stable/8/; revision=294538
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Avoid reading pass the end of the source buffer when it is not NUL
terminated.
If this buffer is adjacent to an unmapped page or a version of C with
bounds checked is used this may result in a crash.
PR: 206177
Submitted by: Alexander Cherepanov <cherepan@mccme.ru>
Requested by: danfe
Notes:
svn path=/stable/8/; revision=294537
|
|
|
|
|
|
|
|
|
|
| |
end of a name component.
PR: 176093
Submitted by: landonf__at__bikemonkey.org
Notes:
svn path=/stable/8/; revision=284561
|
|
|
|
|
|
|
|
| |
Reassign copyright statements on several files from Advanced
Computing Technologies LLC to Hudson River Trading LLC.
Notes:
svn path=/stable/8/; revision=283927
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Various updates to the ftruncate(2) documentation:
- Note that ftruncate(2) can operate on shared memory objects and cross
reference shm_open(2).
- Note that ftruncate(2) does not change the file position pointer (aka
seek pointer) of the file descriptor.
- ftruncate(2) will fail with EINVAL for all sorts of other fd types than
just sockets, so instead note that it fails for all but regular files and
shared memory objects.
- Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
(Or at least the manpage for both appeared in 4.2, I did not check the
kernel code itself to see if either predated 4.2.)
PR: 199472
Notes:
svn path=/stable/8/; revision=283916
|
|
|
|
|
|
|
|
|
|
| |
vfork() first appeared in 3BSD which pre-dates 2.9BSD. Verified via the
copy of 3BSD on disc 1 of "The CSRG Archives".
PR: 198612
Notes:
svn path=/stable/8/; revision=283912
|
|
|
|
|
|
|
|
|
|
|
| |
When catopen(3) returns an error, it caches the result of that error from
r202992. The refcount on the cache entry is not initialized, so any attempt
to clean the cache will skip over this item since it likely has a >0 value.
This change is currently a NOP.
Notes:
svn path=/stable/8/; revision=281035
|
|
|
|
|
|
|
| |
Document [EPERM] for UNIX sockets.
Notes:
svn path=/stable/8/; revision=281032
|
|
|
|
|
|
|
|
|
|
|
| |
Disallow pattern spaces which would cause intermediate calculations to
overflow size_t.
Obtained from: DragonFly (2841837793bd095a82f477e9c370cfe6cfb3862c dillon)
Security: CERT VU#695940
Notes:
svn path=/stable/8/; revision=278912
|
|
|
|
|
|
|
|
|
| |
Plug a memory leak.
Obtained from: DragonFlyBSD (commit 5119ece)
Notes:
svn path=/stable/8/; revision=276555
|
|
|
|
| |
Notes:
svn path=/stable/8/; revision=269684
|
|
|
|
| |
Notes:
svn path=/stable/8/; revision=269683
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r227519 (das)
Sync the style, comments, and variable names of arc4random.c with
OpenBSD's version (r1.22). No functional changes, as verified with
md5.
r227520 (das)
Further reduce diffs with OpenBSD's arc4random. The main functional
change here is to ensure that when a process forks after arc4random
is seeded, the parent and child don't observe the same random sequence.
OpenBSD's fix introduces some additional overhead in the form of a
getpid() call.
The only significant remaining difference between our arc4random and
OpenBSD's is in how we seed the generator in arc4_stir().
Notes:
svn path=/stable/8/; revision=267380
|
|
|
|
|
|
|
|
|
|
|
| |
msync(2) must return ENOMEM and not EINVAL when the address is outside the
allowed range or when one or more pages are not mapped. This according to
The Open Group Base Specifications Issue 7.
Sponsored by: EMC / Isilon storage division
Notes:
svn path=/stable/8/; revision=266574
|
|
|
|
|
|
|
|
|
|
| |
Properly free resources in case of error.
CID: 1007032
Found with: Coverity Prevent(tm)
Notes:
svn path=/stable/8/; revision=266250
|
|
|
|
|
|
|
|
|
|
| |
Match the correct variable to the variable description.
PR: 121173
Submitted by: Thomas Mueller <tmueller at sysgo.com>
Notes:
svn path=/stable/8/; revision=262590
|
|
|
|
| |
Notes:
svn path=/stable/8/; revision=261282
|
|
|
|
|
|
|
| |
Provide the manual page for aio_fsync(2).
Notes:
svn path=/stable/8/; revision=260625
|
|
|
|
|
|
|
|
|
| |
The compile time constant limit on number of swap devices was removed in 5.2.
As such, remove the EINVAL error saying so. Currently the vm.nswapdev sysctl
just represents the number of added swap devices.
Notes:
svn path=/stable/8/; revision=260200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- NOTE_TRACK has never triggered a NOTE_TRACK event from the parent pid.
If NOTE_FORK is set, the listener will get a NOTE_FORK event from
the parent pid, but not a separate NOTE_TRACK event.
- Explicitly note that the event added to monitor the child process
preserves the fflags from the original event.
- Move the description of NOTE_TRACKERR under NOTE_TRACK as it is not a
bit for the user to set (which is what this list pupports to be).
Also, explicitly note that if an error occurs, the NOTE_CHILD event
will not be generated.
Notes:
svn path=/stable/8/; revision=257717
|
|
|
|
|
|
|
|
|
|
|
| |
dup2().
The ability to clear a file descriptor's close-on-exec flag via
posix_spawn_file_actions_adddup2() is in fact proposed in Austin Group issue
#411.
Notes:
svn path=/stable/8/; revision=254872
|
|
|
|
|
|
|
|
|
|
|
| |
descriptor.
As per POSIX.1-2008, posix_spawn_file_actions_add* return [EBADF] if a file
descriptor is negative, not [EINVAL]. The bug was only in the manual page;
the code is correct.
Notes:
svn path=/stable/8/; revision=254869
|
|
|
|
| |
Notes:
svn path=/stable/8/; revision=253600
|
|
|
|
|
|
|
| |
MFC reminded by: Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>
Notes:
svn path=/stable/8/; revision=253343
|
|
|
|
|
|
|
|
| |
Fix the handling of SCTP_CURRENT_ASSOC and SCTP_ALL_ASSOC in
sctp_opt_info().
Notes:
svn path=/stable/8/; revision=253265
|
|
|
|
|
|
|
|
| |
Fix a bug where SCTP_ENABLE_STREAM_RESET is not handled by
sctp_opt_info().
Notes:
svn path=/stable/8/; revision=253264
|
|
|
|
|
|
|
|
|
| |
Remove the number of addresses restriction from sctp_connectx().
Remove unused code.
While there, do some cleanup of the code.
Notes:
svn path=/stable/8/; revision=252984
|
|
|
|
|
|
|
| |
Add ZFS to UFS-like file systems.
Notes:
svn path=/stable/8/; revision=251412
|
|
|
|
|
|
|
|
| |
Document that sem_wait() can fail with EINTR if it is interrupted by a
signal.
Notes:
svn path=/stable/8/; revision=251153
|
|
|
|
|
|
|
|
| |
- Add the getcontextx prototype to SYNOPSIS.
- Link getcontextx(3) to getcontext(3).
Notes:
svn path=/stable/8/; revision=250682
|
|
|
|
|
|
|
|
| |
PR: kern/177704
Submitted by: martymac
Notes:
svn path=/stable/8/; revision=249938
|
|
|
|
|
|
|
|
| |
- sl_find does not modify 'name'
- make the prototype of sl_find match NetBSD
Notes:
svn path=/stable/8/; revision=249913
|
|
|
|
|
|
|
| |
Switch from K&R prototypes to modern C
Notes:
svn path=/stable/8/; revision=249911
|
|
|
|
|
|
|
|
|
|
| |
Fix assignment of maximum bounadary.
Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev fd39c81ba220f7ad6e4dc9b30d45e828cf58a1ad
Notes:
svn path=/stable/8/; revision=249289
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit. Merge it:
Remove undefined behavior from sranddev() and
srandomdev(). This doesn't actually work
with any modern C compiler:
In particular, both clang and modern gcc
verisons silently elide any xor operation
with 'junk'.
No mergeinfo changes with this commit as r241475 already updated the
mergeinfo.
Notes:
svn path=/stable/8/; revision=248821
|
|
|
|
|
|
|
| |
Improve code style. No functional change.
Notes:
svn path=/stable/8/; revision=248020
|
|
|
|
|
|
|
| |
Cleanup the code a bit, which improves the portability.
Notes:
svn path=/stable/8/; revision=248007
|
|
|
|
|
|
|
| |
Fix the handling of mapped IPv6 addresses in sctp_connectx().
Notes:
svn path=/stable/8/; revision=248006
|
|
|
|
|
|
|
| |
Fix errno in a couple of error cases.
Notes:
svn path=/stable/8/; revision=248000
|
|
|
|
|
|
|
|
|
|
| |
Add a IP_RECVTOS socket option to receive for received UDP/IPv4
packets a cmsg of type IP_RECVTOS which contains the TOS byte.
Much like IP_RECVTTL does for TTL. This allows to implement a
protocol on top of UDP and implementing ECN.
Notes:
svn path=/stable/8/; revision=247944
|
|
|
|
| |
Notes:
svn path=/stable/8/; revision=247500
|
|
|
|
|
|
|
|
|
| |
Change examples to be consistent with what style(9) says.
Approved by: joel (mentor)
Notes:
svn path=/stable/8/; revision=247466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.
PR: docs/176197
Submitted by: Fernando, fapesteguia at opensistemas.com
Christoph Mallon, christoph.mallon at gmx.de
Approved by: gjb (mentor), remko (mentor)
Notes:
svn path=/stable/8/; revision=247276
|
|
|
|
|
|
|
| |
Document the ERESTART translation to EINTR for devfs nodes.
Notes:
svn path=/stable/8/; revision=247084
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Protect against DoS attacks, such as being described in CVE-2010-2632.
The changes were derived from what has been committed to NetBSD, with
modifications. These are:
1. Preserve the existsing GLOB_LIMIT behaviour by including the number
of matches to the set of parameters to limit.
2. Change some of the limits to avoid impacting normal use cases:
GLOB_LIMIT_STRING - change from 65536 to ARG_MAX so that glob(3)
can still provide a full command line of expanded names.
GLOB_LIMIT_STAT - change from 128 to 1024 for no other reason than
that 128 feels too low (it's not a limit that impacts the
behaviour of the test program listed in CVE-2010-2632).
GLOB_LIMIT_PATH - change from 1024 to 65536 so that glob(3) can
still provide a fill command line of expanded names.
3. Protect against buffer overruns when we hit the GLOB_LIMIT_STAT or
GLOB_LIMIT_READDIR limits. We append SEP and EOS to pathend in
those cases. Return GLOB_ABORTED instead of GLOB_NOSPACE when we
would otherwise overrun the buffer.
This change also modifies the existing behaviour of glob(3) in case
GLOB_LIMIT is specifies by limiting the *new* matches and not all
matches. This is an important distinction when GLOB_APPEND is set or
when the caller uses a non-zero gl_offs. Previously pre-existing
matches or the value of gl_offs would be counted in the number of
matches even though the man page states that glob(3) would return
GLOB_NOSPACE when gl_matchc or more matches were found.
The limits that cannot be circumvented are GLOB_LIMIT_STRING and
GLOB_LIMIT_PATH all others can be crossed by simply calling glob(3)
again and with GLOB_APPEND set.
The entire description above applies only when GLOB_LIMIT has been
specified of course. No limits apply when this flag isn't set!
Obtained from: Juniper Networks, Inc
Notes:
svn path=/stable/8/; revision=246357
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In globextend() when the pathv vector cannot be (re-)allocated, don't
free and clear the gl_pathv pointer in the glob_t structure. Such
breaks the invariant of the glob_t structure, as stated in the comment
right in front of the globextend() function. If gl_pathv was non-NULL,
then gl_pathc was > 0. Making gl_pathv a NULL pointer without also
setting gl_pathc to 0 is wrong.
Since we otherwise don't free the memory associated with a glob_t in
error cases, it's unlikely that this change will cause a memory leak
that wasn't already there to begin with. Callers of glob(3) must
call globfree(3) irrespective of whether glob(3) returned an error
or not.
MFC r243759 (marcel):
In globextend(), take advantage of the fact that realloc(NULL, size) is
equivalent to malloc(size). This eliminates the conditional expression
used for calling either realloc() or malloc() when realloc() will do
all the time.
Notes:
svn path=/stable/8/; revision=246356
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Reduce buffer size from LINE_MAX to PATH_MAX, there is no point to store
path longer than this.
- Fix an unreached case of check against sizeof buf, which in turn leads
to an off-by-one nul byte write on the stack. The original condition
can never be satisfied because the passed boundary is the maximum value
that can be returned, so code was harmless.
Notes:
svn path=/stable/8/; revision=246198
|
|
|
|
|
|
|
| |
- Use standard RETURN VALUES section.
Notes:
svn path=/stable/8/; revision=245789
|
|
|
|
|
|
|
| |
of getipnodebyname(1) only to IPv6 address.
Notes:
svn path=/stable/8/; revision=245557
|
|
|
|
|
|
|
| |
Add Simplified Chinese catalogs.
Notes:
svn path=/stable/8/; revision=245278
|