2021-06-18 00:31:49 -05:00
|
|
|
|
2006-05-31 22:40:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-30 17:45:10 +00:00
|
|
|
|
2006-05-31 22:40:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-06-01 05:09:10 +00:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2022-01-19 22:00:29 -06:00
|
|
|
|
|
|
|
|
|
2007-11-16 23:37:35 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2020-12-14 16:40:20 +10:00
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2020-12-14 16:40:20 +10:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-19 14:16:57 +00:00
|
|
|
|
|
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-01 11:15:28 +00:00
|
|
|
|
2024-02-05 14:43:17 -06:00
|
|
|
|
2024-02-01 11:15:28 +00:00
|
|
|
|
|
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-14 11:47:24 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
2022-04-08 13:31:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-08 13:31:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 15:37:03 -06:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2022-04-08 13:31:37 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 15:37:03 -06:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 15:37:03 -06:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 15:37:03 -06:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 15:37:03 -06:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-04-21 15:52:32 -03:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-11-19 14:16:57 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-21 15:52:32 -03:00
|
|
|
|
2022-02-16 13:23:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-04-21 15:52:32 -03:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2023-04-21 15:52:32 -03:00
|
|
|
|
2021-05-07 20:00:41 -05:00
|
|
|
|
|
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2021-05-07 20:00:41 -05:00
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-13 10:40:40 +00:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-01 11:15:29 +00:00
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
2025-03-17 15:57:26 +05:30
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
|
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
2019-11-20 17:15:59 +01:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
2025-12-05 20:11:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
2025-12-05 20:11:51 +00:00
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-12-05 20:11:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
2025-12-05 20:11:51 +00:00
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-14 04:58:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-21 19:13:47 +05:30
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-14 04:58:23 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-14 04:58:23 +00:00
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
2025-12-05 20:11:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-11-07 17:40:29 +01:00
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
2025-07-17 17:36:13 +05:30
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
|
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
|
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
cifs: avoid deadlocks while updating iface
We use cifs_tcp_ses_lock to protect a lot of things.
Not only does it protect the lists of connections, sessions,
tree connects, open file lists, etc., we also use it to
protect some fields in each of it's entries.
In this case, cifs_mark_ses_for_reconnect takes the
cifs_tcp_ses_lock to traverse the lists, and then calls
cifs_update_iface. However, that can end up calling
cifs_put_tcp_session, which picks up the same lock again.
Avoid this by taking a ref for the session, drop the lock,
and then call update iface.
Also, in cifs_update_iface, avoid nested locking of iface_lock
and chan_lock, as much as possible. When unavoidable, we need
to pick iface_lock first.
Signed-off-by: Shyam Prasad N <sprasad@microsoft.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
2022-06-24 09:43:59 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
2024-03-13 10:40:40 +00:00
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
2025-07-17 17:36:13 +05:30
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
2022-12-27 11:29:28 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
2022-12-27 11:29:28 +00:00
|
|
|
|
2025-07-17 17:36:13 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-15 17:16:56 +00:00
|
|
|
|
2023-12-29 11:16:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
2023-12-15 17:16:56 +00:00
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-26 11:24:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
2023-03-14 11:14:58 +00:00
|
|
|
|
|
|
|
|
|
2024-01-08 12:07:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-01-08 12:07:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
2024-01-08 12:08:29 +03:00
|
|
|
|
2023-10-13 09:25:30 +00:00
|
|
|
|
|
|
|
|
|
2024-01-08 12:07:59 +03:00
|
|
|
|
|
|
|
|
|
2025-06-02 22:37:14 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-03 08:47:30 +00:00
|
|
|
|
|
|
|
|
|
2020-12-14 16:40:20 +10:00
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2020-12-14 16:40:20 +10:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-04-14 22:42:53 -07:00
|
|
|
|
2024-12-09 12:07:09 +01:00
|
|
|
|
2020-04-14 22:42:53 -07:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-05-28 16:32:48 +02:00
|
|
|
|
2024-12-09 12:07:09 +01:00
|
|
|
|
2020-04-14 22:42:53 -07:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2020-12-09 23:07:12 -06:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-10 00:06:02 -06:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
2022-06-06 09:52:46 +00:00
|
|
|
|
2025-03-17 15:57:27 +05:30
|
|
|
|
2022-06-06 09:52:46 +00:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-10-06 19:16:24 +02:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2020-05-30 17:29:50 -05:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-03-06 17:46:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2022-01-01 12:50:21 +00:00
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
|
|
|
|
|
2021-07-19 17:37:52 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
|
|
|
|
|
2023-11-06 16:22:11 +00:00
|
|
|
|
2021-07-19 10:54:46 +00:00
|
|
|
|
2021-07-19 17:37:52 +00:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
2022-07-05 11:16:24 +00:00
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
2023-10-13 11:40:09 +00:00
|
|
|
|
2021-07-19 12:46:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 14:04:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
2022-07-05 11:16:24 +00:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
2023-08-17 12:34:10 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-17 22:45:24 +08:00
|
|
|
|
2019-09-20 06:31:10 +02:00
|
|
|
|
|
|
|
|
|
2006-05-31 22:40:51 +00:00
|
|
|
|
|
|
|
|
|
2011-12-27 16:22:00 +04:00
|
|
|
|
2011-05-27 04:34:02 +00:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
2013-05-04 22:12:25 -05:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-04 22:12:25 -05:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-05-04 22:12:25 -05:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 09:53:07 -05:00
|
|
|
|
2023-11-06 22:40:38 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
2011-03-13 05:08:25 +00:00
|
|
|
|
|
|
|
|
|
2012-01-31 11:52:01 +03:00
|
|
|
|
2020-04-14 22:42:53 -07:00
|
|
|
|
|
|
|
|
|
2012-01-31 11:52:01 +03:00
|
|
|
|
|
|
|
|
|
2010-10-28 09:53:07 -05:00
|
|
|
|
2023-01-10 20:35:46 -03:00
|
|
|
|
2013-03-11 18:22:32 +02:00
|
|
|
|
|
|
|
|
|
2010-10-28 09:53:07 -05:00
|
|
|
|
2020-04-14 22:42:53 -07:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
|
|
|
|
|
2010-10-28 09:53:07 -05:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-05-25 07:37:04 -05:00
|
|
|
|
2021-12-22 11:04:05 -05:00
|
|
|
|
2022-05-25 07:37:04 -05:00
|
|
|
|
2021-12-22 11:04:05 -05:00
|
|
|
|
|
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-11-07 18:20:50 -08:00
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
|
|
|
|
|
2019-09-20 06:22:14 +02:00
|
|
|
|
2016-11-07 18:20:50 -08:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
2010-12-11 14:19:22 -06:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
|
|
|
|
|
2022-01-19 22:00:29 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-25 01:05:23 -05:00
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
2010-10-19 11:47:52 -05:00
|
|
|
|
2011-05-27 04:34:02 +00:00
|
|
|
|
2021-07-19 13:54:16 +00:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-23 12:24:02 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-10-04 07:17:55 -04:00
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
2023-10-04 07:17:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
2010-12-11 14:19:22 -06:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
|
|
|
|
|
2016-05-03 10:52:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-09-08 21:10:58 +00:00
|
|
|
|
2016-05-03 10:52:30 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
2022-05-25 07:37:04 -05:00
|
|
|
|
2021-11-05 19:03:57 +00:00
|
|
|
|
|
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
2021-12-07 22:51:04 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-10-28 09:53:07 -05:00
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
2010-10-21 14:25:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
2010-10-21 14:25:08 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
2016-05-26 11:52:25 +02:00
|
|
|
|
cifs NTLMv2/NTLMSSP ntlmv2 within ntlmssp autentication code
Attribue Value (AV) pairs or Target Info (TI) pairs are part of
ntlmv2 authentication.
Structure ntlmv2_resp had only definition for two av pairs.
So removed it, and now allocation of av pairs is dynamic.
For servers like Windows 7/2008, av pairs sent by server in
challege packet (type 2 in the ntlmssp exchange/negotiation) can
vary.
Server sends them during ntlmssp negotiation. So when ntlmssp is used
as an authentication mechanism, type 2 challenge packet from server
has this information. Pluck it and use the entire blob for
authenticaiton purpose. If user has not specified, extract
(netbios) domain name from the av pairs which is used to calculate
ntlmv2 hash. Servers like Windows 7 are particular about the AV pair
blob.
Servers like Windows 2003, are not very strict about the contents
of av pair blob used during ntlmv2 authentication.
So when security mechanism such as ntlmv2 is used (not ntlmv2 in ntlmssp),
there is no negotiation and so genereate a minimal blob that gets
used in ntlmv2 authentication as well as gets sent.
Fields tilen and tilbob are session specific. AV pair values are defined.
To calculate ntlmv2 response we need ti/av pair blob.
For sec mech like ntlmssp, the blob is plucked from type 2 response from
the server. From this blob, netbios name of the domain is retrieved,
if user has not already provided, to be included in the Target String
as part of ntlmv2 hash calculations.
For sec mech like ntlmv2, create a minimal, two av pair blob.
The allocated blob is freed in case of error. In case there is no error,
this blob is used in calculating ntlmv2 response (in CalcNTLMv2_response)
and is also copied on the response to the server, and then freed.
The type 3 ntlmssp response is prepared on a buffer,
5 * sizeof of struct _AUTHENTICATE_MESSAGE, an empirical value large
enough to hold _AUTHENTICATE_MESSAGE plus a blob with max possible
10 values as part of ntlmv2 response and lmv2 keys and domain, user,
workstation names etc.
Also, kerberos gets selected as a default mechanism if server supports it,
over the other security mechanisms.
Signed-off-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
2010-09-18 22:02:18 -05:00
|
|
|
|
2010-10-19 11:47:52 -05:00
|
|
|
|
2009-05-04 08:37:12 +00:00
|
|
|
|
|
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
2017-01-18 15:35:57 +05:30
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-28 01:04:23 -06:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-28 01:04:23 -06:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
|
|
|
|
|
2020-08-23 17:36:59 -05:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-20 12:24:14 -06:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
2013-09-27 18:35:42 +01:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
2021-08-19 20:34:58 +10:00
|
|
|
|
2013-06-12 19:52:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|