Commit Graph

97870 Commits

Author SHA1 Message Date
Søren Schmidt
986a964900 Use the saved params for LBA-CHS conversion. Fixes PC98 bug. 2004-01-08 19:17:16 +00:00
Maxime Henrion
ec6a729924 Some integrated Davicom cards in sparc64 boxes have an all zeros
MAC address in the EEPROM, and we need to get it from OpenFirmware.
This isn't very pretty but time is lacking to do this in a better
way this near 5.2-RELEASE.  This is a RELENG_5_2 candidate.

Original version by:	Marius Strobl <marius@alchemy.franken.de>
Tested by:		Pete Bentley <pete@sorted.org>
Reviewed by:		jake
2004-01-08 19:08:27 +00:00
Andre Oppermann
53369ac9bb Limiters and sanity checks for TCP MSS (maximum segement size)
resource exhaustion attacks.

For network link optimization TCP can adjust its MSS and thus
packet size according to the observed path MTU.  This is done
dynamically based on feedback from the remote host and network
components along the packet path.  This information can be
abused to pretend an extremely low path MTU.

The resource exhaustion works in two ways:

 o during tcp connection setup the advertized local MSS is
   exchanged between the endpoints.  The remote endpoint can
   set this arbitrarily low (except for a minimum MTU of 64
   octets enforced in the BSD code).  When the local host is
   sending data it is forced to send many small IP packets
   instead of a large one.

   For example instead of the normal TCP payload size of 1448
   it forces TCP payload size of 12 (MTU 64) and thus we have
   a 120 times increase in workload and packets. On fast links
   this quickly saturates the local CPU and may also hit pps
   processing limites of network components along the path.

   This type of attack is particularly effective for servers
   where the attacker can download large files (WWW and FTP).

   We mitigate it by enforcing a minimum MTU settable by sysctl
   net.inet.tcp.minmss defaulting to 256 octets.

 o the local host is reveiving data on a TCP connection from
   the remote host.  The local host has no control over the
   packet size the remote host is sending.  The remote host
   may chose to do what is described in the first attack and
   send the data in packets with an TCP payload of at least
   one byte.  For each packet the tcp_input() function will
   be entered, the packet is processed and a sowakeup() is
   signalled to the connected process.

   For example an attack with 2 Mbit/s gives 4716 packets per
   second and the same amount of sowakeup()s to the process
   (and context switches).

   This type of attack is particularly effective for servers
   where the attacker can upload large amounts of data.
   Normally this is the case with WWW server where large POSTs
   can be made.

   We mitigate this by calculating the average MSS payload per
   second.  If it goes below 'net.inet.tcp.minmss' and the pps
   rate is above 'net.inet.tcp.minmssoverload' defaulting to
   1000 this particular TCP connection is resetted and dropped.

MITRE CVE:	CAN-2004-0002
Reviewed by:	sam (mentor)
MFC after:	1 day
2004-01-08 17:40:07 +00:00
Bill Paul
2aae662479 Add the PCI ID for yet another bge chip: the Altima 1002.
Submitted by: Pavel Gubin <pg@rainbow.ie.tusur.ru>
2004-01-08 17:19:11 +00:00
Bill Paul
8d1da39d69 Add the NDISAPI option. 2004-01-08 17:13:10 +00:00
Nate Lawson
9bb87cde3e Always clean all files, including ones under ACPI_DEBUG when doing a
"make clean".
2004-01-08 16:38:32 +00:00
Daniel Eischen
7d7a08f174 MFlibpthread: Add a simple work-around for deadlocking on recursive
readlocks on a rwlock while there are writers waiting.
2004-01-08 15:39:12 +00:00
Daniel Eischen
24f33bca1c Add a simple work-around for deadlocking on recursive read locks
on a rwlock while there are writers waiting.  We normally favor
writers but when a reader already has at least one other read lock,
we favor the reader.  We don't track all the rwlocks owned by a
thread, nor all the threads that own a rwlock -- we just keep
a count of all the read locks owned by a thread.

PR:	24641
2004-01-08 15:37:09 +00:00
Hidetoshi Shimokawa
11fe249262 * firewire
Add tcode_str[] and improve debug message.
* sbp
	If max_speed is negative, use the maximum speed which the
	ohci chip supports.  The default max_speed is -1.
* if_fwe
	If tx_speed is negative, use the maximum speed which the
	ohci chip supports.  The default tx_speed is 2.
2004-01-08 14:58:09 +00:00
Ruslan Ermilov
9387ab35e7 Cosmetics: rearrange the dependency list to match that of ssh and sshd.
Reviewed by:	des
2004-01-08 11:41:02 +00:00
Ruslan Ermilov
e1542a4058 Fixed static linkage.
Reviewed by:	des
2004-01-08 11:40:19 +00:00
Andre Oppermann
bf87c82ebb If path mtu discovery is enabled set the DF bit in all cases we
send packets on a tcp connection.

PR:		kern/60889
Tested by:	Richard Wendland <richard@wendland.org.uk>
Approved by:	re (scottl)
2004-01-08 11:17:11 +00:00
Andre Oppermann
e0f630ea7a Do not set the ip_id to zero when DF is set on packet and
restore the general pre-randomid behaviour.

Setting the ip_id to zero causes several problems with
packet reassembly when a device along the path removes
the DF bit for some reason.

Other BSD and Linux have found and fixed the same issues.

PR:		kern/60889
Tested by:	Richard Wendland <richard@wendland.org.uk>
Approved by:	re (scottl)
2004-01-08 11:13:40 +00:00
Bill Paul
3e1b0c31a1 Correct the definition of the ndis_miniport_interrupt structure:
the ni_dpccountlock member is an ndis_kspin_lock, not an
ndis_spin_lock (the latter is too big).

Run if_ndis.c:ndis_tick() via taskqueue_schedule(). Also run
ndis_start() via taskqueue in certain circumstances.

Using these tweaks, I can now get the Broadcom BCM5701 NDIS
driver to load and run. Unfortunately, the version I have seems
to suffer from the same bug as the SMC 83820 driver, which is
that it creates a spinlock during its DriverEntry() routine.
I'm still debating the right way to deal with this.
2004-01-08 10:44:37 +00:00
Dag-Erling Smørgrav
e7ffa415e8 Use += instead of = with DPADD / LDADD. 2004-01-08 09:50:56 +00:00
Dag-Erling Smørgrav
a5ac46fb04 Regenerate config.h; I don't know why this didn't hit CVS yesterday. 2004-01-08 09:42:35 +00:00
Dag-Erling Smørgrav
9f80be8e3d Enable GSSAPI support. [1]
Also remove some duplicates from ssh's SRCS.

Submitted by:	[1] Björn Grönvall <bg@sics.se>
2004-01-08 09:05:24 +00:00
SUZUKI Shinsuke
ce4bcde831 fixed improper routing-message flag
Obtained from: KAME
2004-01-08 07:25:04 +00:00
Don Lewis
4ff4a9bee9 The transmit frame status is stored in the last transmit descriptor for the
frame, not the first.  It is probably also not safe to free the mbuf chain
as soon as the OWN bit is cleared on the first descriptor since the chip
may not be done copying the frame into the transmit FIFO.  Revert the part of
of busdma conversion (if_dc.c rev 1.115) which changed dc_txeof() to look for
the status in the first descriptor and free the mbuf chain when processing
the first descriptor for the frame, and revert the matching changes elsewhere
in the driver.  This part of the busdma change caused the driver to report
spurious collisions and output errors, even when running in full-duplex mode.
Reverting the mbuf chain handling slightly complicates dc_dma_map_txbuf(),
since it is responsible for setting the OWN bits on the descriptors, but does
not normally have direct access to the mbuf chain.

Tested by:
  Dejan Lesjak <dejan.lesjak at ijs.si>  alpha/<Intel 21143 10/100BaseTX>
  "Xin LI" <delphij at frontfree.net>    i386/<Macronix 98713 10/100BaseTX>
  Wiktor Niesiobedzki <bsd at w.evip.pl> i386/<3Com OfficeConnect 10/100B>

Reviewed by:	mux
2004-01-08 06:22:15 +00:00
Sam Leffler
d4b2657f98 Remove extraneous unlock. This fixes a panic seen when manipulating static
entries in the ARP table.
2004-01-07 23:42:21 +00:00
Ceri Davies
a8e1969bfb Correct an instance of an erroneous "it's".
PR:		docs/59937
Submitted by:	Ada Lim <ada@bsd.org>
MFC After:	1 day
2004-01-07 23:31:22 +00:00
John Baldwin
ed91a3d95a Comsetic tweaks: use PCPU_GET(cpumask) and CPU_ABSENT().
Tested by:	Dejan Lesjak <dejan.lesjak@ijs.si>
2004-01-07 23:00:20 +00:00
Greg Lehey
8cfbf24f2e Correct capitalization.
Submitted by: ru
2004-01-07 23:00:01 +00:00
Bill Paul
bf952fec70 Add 'device wlan' to synopsis. 2004-01-07 22:17:53 +00:00
Marc Fonvieille
704ee201ff Netgear WG511T card is a CardBus not a PCI card.
PR:		docs/61039
Submitted by:	Michael Lestinsky <michael@lestinsky.de>
2004-01-07 20:49:51 +00:00
Bill Paul
0fba60013b Correct and simplify the implementation of RtlEqualUnicodeString(). 2004-01-07 20:31:51 +00:00
Marc Fonvieille
cf8dceeb43 Add a tip on how to print a manual page.
PR:		docs/61033
Submitted by:	mi@
2004-01-07 19:49:12 +00:00
Eric Anholt
c83098a31d man ftpd says that "by default, anonymous users cannot modify existing files."
However, the code did allow deletion of files.  Make deleting require the -m
flag, too.

PR:		bin/60809
Submitted by:	Alexander Melkov <melkov@comptek.ru>
2004-01-07 19:28:31 +00:00
Bill Paul
9163fadb70 It appears drivers may call NdisWriteErrorLogEntry() with locks
held. However, if we need to translate a unicode message table message,
ndis_unicode_to_ascii() might malloc() some memory, which causes
a warning from witness. Avoid this by using some stack space to hold
the translated message. (Also bounds check to make sure we don't
overrun the stack buffer.)
2004-01-07 19:26:47 +00:00
Sam Leffler
23428eafa0 When draining the tx queue reclaim any node references held in packets.
This fixes a problem when operating as an AP where clients would get
stuck in the node table because the reference count never went to zero.
2004-01-07 19:16:49 +00:00
Sam Leffler
a9c0425768 When ath_hal_stoptxdma returns an error dma is still likely stopped
so don't just stop trying to send a beacon frame or we'll be more likely
to lose sync.  This only seems to happen on some older chips.
2004-01-07 19:11:11 +00:00
Sam Leffler
7bbf937701 use ath_reset instead of ath_init when recovering from a watchdog timeout:
resetting the hardware is sufficient, no need to reset the 802.11 fsm
2004-01-07 19:07:41 +00:00
Sam Leffler
f3be79561f make hw.ath.debug a tunable 2004-01-07 19:05:35 +00:00
Sam Leffler
8c0370b75d make hw.ath.outdoor and hw.ath.countrycode tunables 2004-01-07 19:04:42 +00:00
Sam Leffler
e325e53069 split debugging messages up into classes;
ah_debug is now treated as a bit vector
2004-01-07 18:57:38 +00:00
Robert Watson
1f1ca35f69 Lock p->p_textvp before calling vn_fullpath() on it. Note the
potential lock order concern due to the vnode lock held
simultaneously by the caller into procfs.

Reported by:	kuriyama
Approved by:	des
2004-01-07 17:58:51 +00:00
David Malone
1bc99f1144 Move declarations of Procfd to a header file. 2004-01-07 14:29:45 +00:00
David Malone
9b83b9f75c Fix a printf format warning. 2004-01-07 14:27:30 +00:00
Dag-Erling Smørgrav
3b7f13a03b Previous commit erroneously listed some sources with .o suffixes. 2004-01-07 11:59:52 +00:00
Dag-Erling Smørgrav
6e14bc788d Get moduli from the OpenSSH sources instead of keeping a local copy. 2004-01-07 11:55:44 +00:00
Dag-Erling Smørgrav
e2fb0b2a6b Update to reflect changes since the last version. 2004-01-07 11:51:18 +00:00
Dag-Erling Smørgrav
a04e3d6c30 Update Makefiles for OpenSSH 3.7.1p2. 2004-01-07 11:17:23 +00:00
Dag-Erling Smørgrav
cf2b5f3b6d Resolve conflicts and remove obsolete files.
Sponsored by:	registrar.no
2004-01-07 11:16:27 +00:00
Dag-Erling Smørgrav
fb7dd0a77c This commit was generated by cvs2svn to compensate for changes in r124208,
which included commits to RCS files with non-trunk default branches.
2004-01-07 11:10:17 +00:00
Dag-Erling Smørgrav
d95e11bf7e Vendor import of OpenSSH 3.7.1p2. 2004-01-07 11:10:17 +00:00
Dag-Erling Smørgrav
221552e490 Merge OpenSSH 3.7.1p2. 2004-01-07 11:10:02 +00:00
Joerg Wunsch
d93dea685d Fix a long-standing bug that had been introduced in rev 1.24 with the
replacement of struct proc by struct thread.  This bug could cause a
NULL pointer dereferencation under certain circumstances (e. g. while
running /etc/rc.d/pcvt).
2004-01-07 10:12:59 +00:00
Bill Paul
e157128762 Use atomic ops for the interlocked increment and decrement routines
in subr_ndis and subr_ntoskrnl. This is faster and avoids potential
LOR whinage from witness (an LOR couldn't happen with the old code
since the interlocked inc/dec routines could not sleep with a lock
held, but this will keep witness happy and it's more efficient
anyway. I think.)
2004-01-07 07:29:27 +00:00
Bill Paul
e3c8d8194c In subr_ndis.c: correct ndis_interlock_inc() and ndis_interlock_dec()
so we increment the right thing. (All work and not enough parens
make Bill something something...) This makes the RealTek 8139C+
driver work correctly.

Also fix some mtx_lock_spin()s and mtx_unlock_spin()s that should
have been just plain mtx_lock()s and mtx_unlock()s.

In kern_ndis.c: remove duplicate code from ndis_send_packets() and
just call the senddone handler (ndis_txeof()).
2004-01-07 06:15:56 +00:00
Eric Anholt
01a9bce5ee Allow trailing slashes for MNT_UPDATE case (mount -u), too.
PR:		bin/59144
Submitted by:	Stefan Farfeleder <stefan@fafoe.narf.at>
2004-01-07 05:37:56 +00:00