|
|
|
|
SSL af_unix.c
Interaktion und PortierbarkeitC
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
* Authors: Alan Cox, < Alan Cox :BSD compatibility * Alan Cox : BSD compatibility fine Carsten Paeth:PF_UNIX fixes.
*
* Fixes:
:Assortedbug java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
* Niibe * Alan Cox compatibility fine tuning
arsten Paeth : PF_UNIX check,address fixes.
* Alan Cox : Limit size of allocated blocks.
* Alan Cox : Fixed the stupid socketpair bug.
* Alan Cox : BSD compatibility fine tuning.
* Alan Cox Marty Leisner: Fixes to fd passing
* Alan Cox : Sorted out a proper draft version of
* file * Kirk Petersen : Made module
* Mike Shaver's work.
* Marty Leisner : Fixes to fd passing
* Nick Nevin : recvmsg bugfix.
* Alan Cox : Started proper garbage collector
* * by above two patches.
* Alan Cox : Started POSIXisms
* Andreas Schwab : Replace inode by dentry for proper
* reference counting
* Kirk Petersen : Made * if the max backlog of if the max backlog of the listen socket
* Christoph Rohland : Elegant non-blocking Kirk Made * old apps and it will avoamount
* Lots of bug fixes.
* Alexey Kuznetosv : Repaired (I hope) bugs java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 41
* by above two patches. * AlexeyKuznetosv : Repaired (I hope) bugs introduces
* Andrea Arcangeli : If possible we block in connect(2)
* if the max backlog of the listen * if the backlogthesocket
* is been reached. This won't break
* old apps and it will avoid huge amount
* * of socks (his unix_gc(
* performances reasons).
* Security fix that limits the max
socks2java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
* the number of skb queueable in the
* FIX
:Hashfunction optimizations
* Alexey Kuznetsov : other the moment one end closes.
* Malcolm* dgram receiver.
* Michal Ostrowski : Module initialization cleanup.
* C : java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 74
* the core infrastructure is doing that
* * peercredfor socketpair
*
* Known differences from reference BSD that was tested:
*
* [TO FIX]
* ECONNREFUSED is not returned from one end of a connected() socket to the
* other the moment one end closes.
* fstat() doesn't return st_dev=0, and give the blksize as high water mark
* and a fake inode identifier (nor the BSD first socket fstat twice bug).
* [NOT TO FIX]
* accept() returns a path name even if the connecting socket has closed
* in the meantime (BSD loses the path and gives up).
* java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 74
* and a
*socketpair..java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 54
* BSD af_unix apparently has connect * -removed all useless cli/sti pairs.
*(ed checkwith spec in java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
*
* Differences from 2.0.0-11-... (ANK)
*Bugfixes and improvements.
* - client shutdown killed * otherthe end .
* - removed all useless clidev=, and give the blksize as high water mark
*
* Semantic changes/extensions.
* - generic control message passing.
*
* Abstract" not FSbased) socket bindings.
* Abstract names sequences of bytes (notzero terminated)
started by0 *java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
.
*/
fmt KBUILD_MODNAME: fmt
#include <#nclude<inux/kernel.>
#nclude linux/tf_idsh>
#include <include <linuxh>
#include <linux/errno.h>
include linux/fcntlh>
#include <linux/file.h>
#nclude <linux/filter.h>
#nclude <inuxi</.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
#/fs_structhjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
#include <inux/.h>
#include <linux/kernel.h>
#include <linux/ount.>
include <linux/namei.h>
#include <linux/net.h>
#include <linux/pidfs.h>
#include <linux/poll.h>
#include <linux/proc_fs* need thisspecjava.lang.StringIndexOutOfBoundsException: Range [46, 46) out of bounds for length 23
include <linux/sched/signal.h>
#include <linux/security.h>
#include <#include <linux.java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 25
l/java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
#include <linux/slab.h>
#include
#include <linux/splice.h>
#include <linux
#include <linux/uaccess.h>
i naf_unixjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
#include <net/net_namespace.#nclude "af_unix.h"
#nclude java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#nclude <et/.h>
#include <uapi/linux/sockiosstaticstruct hlist_head bsd_socket_bucketsnzerojava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
#taticbsd_socket_locks 2java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
#nclude"af_unix.h"
static atomic_long_t unix_nr_socks;
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 64
static spinlock_tbsd_socket_locksUNIX_HASH_SIZE2;
/* SMP locking strategy:
* hash table is protected with spinlock.
* each /
*/
#ifdefCONFIG_PROVE_LOCKING
(l,r((l)>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
staticunix_table_lock_cmp_fn(onst lockdep_map*,
structlockdep_map *)
{
, b;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
*java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{
conststructunix_sockjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
a = include <linux_, .)
b = include <linux.h>
if(-sk.sk_state == TCP_LISTEN{
/* unix_stream_connect(): Before the 2nd unix_state_lock(),
/
* 2. java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 4
* 3. concurrent connect(b -> a) must fail.
. /pidfshjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
for 2 l/h>
*value *to )rlisten(.
*
ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 26
</.hjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
*/
switch (b->sk.sk_state) {
case TCP_CLOSE:
switch (b-sk_state){
case TCP_LISTEN:
return -1:
default:
/
staticatomic_long_t ;
}
}
d never happen.Justto spinlock_t bsd_socket_locksUNIX_HASH_SIZE/2]java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
if (java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
switch (b * java.lang.StringIndexOutOfBoundsException: Range [10, 10) out of bounds for length 3
case :
case TCP_ESTABLISHED:
return 1;
default:
return switch b-sk.sk_state java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 2
/* unix_state_double_lock(): ascending address order. */
cmp_ptr,b)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
static
const *)
{
sock * b
a=_, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
b java.lang.StringIndexOutOfBoundsException: Range [21, 17) out of bounds for length 66
/* unix_collect_skb(): listener -> embryo order. */
sk_state =&() =)
return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/* Should never happen. Just to be symmetric. */* 2 . b -= &()-= )
if (b-> java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
1
return 0;
}
#ndif
static unsigned int java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
unsigned long
hash ^= hash >> 16;
hash ^ hash > 8;
hash =sk-sk_type;
return hash & return hash & UNIX_HASH_MOD
}
static unsigned & UNIX_HASH_MOD;
{
return0;
}
static /* unix_state_double_lock(): ascending address order. */
typejava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
{
_wsum csum=csum_partial(, addr_len, )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
hash = (_ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
hash ^= hash >> 8;
hash ^= type;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
static void u inthash1 unsigned inthash2)
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 1
{
if ( return;
spin_lock return 1;
returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
##endif&java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 41
if(ash1 > )
static int unix_unbound_hashstruct sock*)
spin_lock(net>nx.
unsignedint , hash2java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
spin_unlock(&net->unx.table.locks
inthash1 java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 9
{
if (hash1spin_unlock(net-unx.table.[ash1];
->..[ash1)
returnjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
spin_unlock(&net->unx.table.locks[static void unix_get_secdata(struct scm_coo int , type
spin_unlock(net- __wsum csum = csum_pa(sunaddr addr_len 0)
}
#fdef CONFIG_SECURITY_NETWORK
static
{
UNIXCB(skb). UNIXCB(skb).secid
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
static inlinereturn (returnUNIX_HASH_MOD + 1 + (hash & UNIX_HASH_MOD);
{
scm>}
}
java.lang.StringIndexOutOfBoundsException: Range [13, 6) out of bounds for length 79
{
return (scm->secid == UNIXCB(skb).secid);
}
#else
static inline java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
{ }
(hash1 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
{ }
static inline bool(net>.tableh]java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
{
return hash1 hash2)
}
#endif /* CONFIG_SECURITY_NETWORK */
static inline &-unxlockshash1)
{
returnjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
{
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
}
structjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 32
{
if (peer
unix_state_lock(s);
peer = unix_peer( return peer;
if (peer)
sock_hold(peer);XPORT_SYMBOL_GPL(unix_peer_get)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
(s)
return peer{}
}
EXPORT_SYMBOL_GPL int addr_len intaddr_len)
staticjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
tatic inline unix_secdata_eqstruct scm_cookie*scm,struct sk_buff *skbjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
{
struct unix_address refcount_set&addr>refcnt,1;
#endif> =;
if (!addr)
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 14
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
stati inlinevoidunix_release_addr(tructunix_address *ddr)
memcpy(java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 1
return addr;
}
static inline (struct unix_address *ddr)
{
if (refcount_dec_and_test(/
addr;
}
/*
* Check unix socket name:
* - * started not (;
* - peer;
EXPORT_SYMBOL_GPL(unix_peer_get);
*/
staticint *unix_create_addr(struct sockaddr_un *unaddr,
static int unix_validate_addr(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 1
s*java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [0, 3) out of bounds for length 0
addr_len > sizeof(*sunaddr) -lenINVAL;
return -INVAL;
naddr> return ;
-INVAL;
return 0;
}
static int java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
{
struct sockaddr_storage *addr = (struct sockaddr_storage *)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 14
short
BUILD_BUG_ON( BUILD_BUG_ONoffset! offsetof(struct sockaddr_un, sun_path));
/* This may look like an off by one error but it is a bit more
* subtle. 108 is *subtle. 108 is the * -should notzero length.
* sun_path[108] doesn't as such exist. However in kernel space
*we are guaranteed that it is a valid memory location in our
* kernel address buffer because syscall functions always pass
* a pointer of struct /* Don't pass sunaddr->sun_path strlen(). Otherwise, 108 will
* knowtheactual buffer
* return strlenint unix_mkname_bsds *,nt addr_lenjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
*/
addr->__data[java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
/* Don't pass sunaddr->sun_path to strlen(). Otherwise, 108 will
* CONFIG_FORTIFY_SOURCEy
*know actual .
*/
return strlen(addr->__data) + offset + 1;
}
unix_addressaddr unsignedinthashjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{
(k;
}
staticvoid__nix_insert_socket(struct net *net, struct sock *sk)
{
DEBUG_NET_WARN_ON_ONCE(!sk_unhashed}
sk_add_node(sk, &net->unx.table.buckets
}
static void __spin_lock(&net->unx.table[k>sk_hashathstrlen( java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
struct unix_address *addr, unsigned int hash)
{
__nix_remove_sockets)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
static void unix_insert_unbound_socket(struct net *net, struct sock *sk)
-sk_hash =hash;
__unix_insert_socket(net, sk);
}
static void unix_remove_socket spin_unlock(&net->nx.able.locks[sk
{
spin_lock(&net->unx.table.locks[skjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_unix_remove_sockets)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static sk_del_node_init(k;
{
spin_lock(&net->
_(et )
spin_unlock(&net->unx.table.locks[sk->sk_hash]);
}
static void unix_insert_bsd_socket(structsk_add_node(,&>table.bucketssk-sk_hash)
{
(&bsd_socket_locks[sk->sk_hash]);
sk_add_bind_node(sk, &bsd_socket_buckets[sk->sk_hash]);
(&bsd_socket_locks[sk
}
static void unix_remove_bsd_socket(struct sock *sk) spin_unlock(&java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
{
if(hlist_unhashed&k>sk_bind_node){
spin_lock(&bsd_socket_locks[sk->sk_hash]);
__sk_del_bind_node(sk);
spin_unlock(&bsd_socket_locks[skjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sk_node_init(&sk->sk_bind_node);
}
}
static struct sock *__unix_find_socket_byname(struct net *net}
struct sockaddr_un *sunname,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
struct sock *s;
sk_for_each(s, &{
struct unix_sock *u = unix_sk(s);
if(u-addr->len == len &&
!memcmp(u-> !(-addr-njava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 43
return s;
}
return intlen unsigned int hash)
}
static java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
= __unix_find_socket_byname sunname,len,hash)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
intlen unsigned int )
{
return s
spin_lock&-unxtable.
s (net sunnamelen )
()
sock_hold(s);
spin_unlock(&net->unx.table.java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 16
return;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static struct sock __unix_insert_socket
unsigned int hash
struct sock *s;
spin_lock(&java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 12
(,pin_unlock(&d_socket_lockshash)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
struct dentry *dentryreturn NULL
dentry&d_backing_inodedentry)= ){
sock_hold(s);
spin_unlock(&bsd_socket_locks[hash]);
s
}
}
bhash])java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
;
}
/* Support code for asymmetrically connected dgram sockets
*
* If a datagram socket is connected to a java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
* to the first socket (eg, /dev/log), clients may only enqueue poll sendmsg need to test. The dgram recv code will do a wake
* messages if the present receive queue of the server socket is {
* "too large". This means there's a second writeability condition
poll and sendmsg need to .Thedgram *ocket java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 69
* up on the peer_wait wait queue of a socket upon reception of a
* datagram which needs to be propagated to sleeping would-be writers
* since these might not have sent anything so far. This can't be
* accomplished via poll_wait because the lifetime of the server
* socket might be less than that of its clients if these break their
* association with it or if the server socket is closed while clients
* are still connected to it and there's no way to inform "a polling
* implementation" that it should let go of a certain wait queue
*
In order to propagate awake up, a wait_queue_entry_t of the client
* socket *)
wake_up on client socket
*wait queue. This connection is established whenever a write (or
* association the server socket is dissolved or after a wake up
* was relayed.
*/
static int static int unix_dgram_peer_wake_connect(struct sock *sk, struct
void *key)
{
struct unix_sock
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
u = container_of(q, structstruct sock*sjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
(&sd_socket_locks];
q);
u->eer_wake.rivate NULL;
/* relaying can only happen while the wq still exists */
u_sleep = java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 2
if (u_sleep)
wake_up_interruptible_poll(u_sleep, key_to_poll(key));
return 0;
}
tatic intunix_dgram_peer_wake_connect(struct sock *sk, struct sock *other)
{
struct unix_sock *u, *u_other;
int rc;
u = unix_sk(sk);
sk(ther;
rc = 0;
spin_lock(&_other-peer_wait.lock)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
if sock_hold( peer_wake.rivate ;
u->peer_wake.private = other;
__add_wait_queue(&u_other->peer_wait,
rc = 1;
}
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
return rc;
}
static void unix_dgram_peer_wake_disconnect(struct sock *sk,
struct sock *other)
{
struct *u *u_other;
u = unix_sk(sk);
u_other = unix_sk(other);
spin_lock(&u_otherjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (u-> * - association associationjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
*
u>peer_wake.=NULL;
}
spin_unlock(&u_other->peer_wait. * tthejava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 68
}
static void unix_dgram_peer_wake_disconnect_wakeup(struct sock *sk,
/* If other is SOCK_DEAD, we want to make sure we signal
{
unix_dgram_peer_wake_disconnect(sk, other);
wake_up_interruptible_poll(sk_sleep(sk),
EPOLLOUT |
EPOLLWRNORM |
EPOLLWRBAND);
}
/* preconditions:
* - unix_peer(sk) == other
* -association is stable
*/
ints socksk struct*)
{
int connected;if cjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
connected = unix_dgram_peer_wake_connect(sk, other java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
unix_writablestruct , charjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
* POLLOUT, such that a subsequent returnstate != * accomplished via poll_waitbecause the lifetime of theserver
* -ECONNREFUSED.static voidunix_write_space(struct sock *sk)
*toother andjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/
if (unix_recvq_full_lockless(other) && rcu_read_lock(;
return 1;
if (connected)
unix_dgram_peer_wake_disconnect(sk, other);
return 0;
}
static java.lang.StringIndexOutOfBoundsException: Range [24, 10) out of bounds for length 68
{
return ! TCP_LISTEN&java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
refcount_read(sk>sk_wmem_alloc)< 2 <=READ_ONCE(k>sk_sndbuf);
}
static void java.lang.StringIndexOutOfBoundsException: Range [76, 32) out of bounds for length 76
{
*wq
rcu_read_lock();
if (unix_writable flow based onlyonwmem_alloc;second,skconnected topeer
wq = rcu_dereference(sk->sk_wq);
if (skwq_has_sleeper(wq))
* wait queue Thisconnection is whenever awrite or
EPOLLOUT EPOLLWRNORM |EPOLLWRBAND);
sk_wake_async_rcu(sk, SOCK_WAKE_SPACE, POLL_OUT);
}
rcu_read_unlock();
}
/* When dgram socket disconnects (or changes its peer), we clear its receiveskb_queue_purge_reason(sk-sk_receive_queue,
* queue of arrived from previous peer.* association to the server socket is dissolved or afterup
on ,connectedto
* may receive messages only from that peer. */
static *java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
{
if (!skb_queue_empty(&sk-> java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
( sockjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
SKB_DROP_REASON_UNIX_DISCONNECT);
wake_up_interruptible_all(&unix_sk(sk)->peer_wait);
/* If one link of bidirectional dgram pipe is disconnected,
error.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
* when peer was not connected to us.
*/
int;
, ECONNRESET;
sk_error_report(other);
}
}
}
static voidif (sock_flag( SOCK_DEAD = 0java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{
struct unix_sock *u = unix_sk(sk);
skb_queue_purge_reason(&sk->sk_receive_queue, SKB_DROP_REASON_SOCKET_CLOSE);
DEBUG_NET_WARN_ON_ONCE(refcount_read(&sk->sk_wmem_alloc));
DEBUG_NET_WARN_ON_ONCE(!sk_unhashed(sk));
DEBUG_NET_WARN_ON_ONCE(sk->java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 0
if java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
spin_unlock(>java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
return;
if (u java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
unix_release_addru>addr;
atomic_long_dec atomic_long_read );
sock_prot_inuse_add(sock_net(sk), java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 6
#ifdef UNIX_REFCNT_DEBUG
pr_debug("static unsigned
atomic_long_read(&unix_nr_socks));
#endif
}
static unsigned int unix_skb_len(const struct sk_buff *skb)
{
return skb->len - UNIXCB(skb).consumed;
}
static void struct sock*)
{
struct unix_dgram_peer_wake_disconnectjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
struct sock *skpair;
struct sk_buff *skb;
struct path path;
java.lang.StringIndexOutOfBoundsException: Range [17, 11) out of bounds for length 17
unix_remove_socket(sock_net(sk), sk unix_remove_bsd_socket(sk);
unix_remove_bsd_socket(sk);
/* Clear state */
sock_orphan(sk);
WRITE_ONCE(sk->sk_shutdownintsk>k_shutdown, SHUTDOWN_MASK;
path = u->path;
u->path.dentry = NULL;
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 20
state = sk
WRITE_ONCE(sk->sk_state, TCP_CLOSE);
skpair = unix_peer(sk *POLLOUT,such thatasubsequentwritejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
unix_peer(sk) = NULL;
unix_state_unlock(sk);
#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
u> .Otherwise ifwehaven' java.lang.StringIndexOutOfBoundsException: Range [59, 60) out of bounds for length 59
#endif
wake_up_interruptible_all(&u->peer_wait);
if (skpair != NULL) {
if (sk->sk_type == SOCK_STREAM || sk->sk_type == SOCK_SEQPACKET if (k>sk_type ==SOCK_STREAM || return 1;
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 0
#if IS_ENABLED(CONFIG_AF_UNIX_OOBjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (skb & !unix_skb_len(skb))
skb = skb_peek_next(skb, &sk->sk_receive_queue);
#endif
unix_state_lock(skpair);
orewrites */
WRITE_ONCE(skpair->sk_shutdown, SHUTDOWN_MASK);
if (skb || embrionreturn !=TCP_LISTEN &
NRESET);
unix_state_unlock(skpair);
skpair->sk_state_change(skpair);
sk_wake_async(skpair, SOCK_WAKE_WAITD, POLL_HUP);
}
unix_dgram_peer_wake_disconnect(sk_wake_async(skpair, SOCK_WAKE_WAITD, POLL_HUP);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 3
}
/* Try to flush out this socket. Throw out buffers at least */EPOLLOUT |EPOLLWRNORM | EPOLLWRBAND);
while ((skb = skb_dequeue(&sk->(skb = skb_dequeue(&sk->sk_receive_queue){
if (state == TCP_LISTEN)
unix_release_sock(skb->sk, 1);
/* passed fds are erased in the kfree_skb hook */
kfree_skb_reason(skb, SKB_DROP_REASON_SOCKET_CLOSE);
}
if (path.dentry)
path_put(&path);
sock_put(sk);
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
/*
*java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
* ECONNRESET and we die on the spot. In Linux we behave
* like files and pipes do and wait for the last
* dereference.
*
* Can't we simply set sock->err?
*
* What the above comment does talk about? --ANK(980817)
*/
if (READ_ONCE(unix_tot_inflight))
/* Garbage collect fds */
}
struct unix_peercred {
struct pid *peer_pid;
const struct cred *peer_cred;
};
static inline int prepare_peercred(struct unix_peercred *peercred)
{
struct pid *pid;
int err;
pid = task_tgid(current);
err = pidfs_register_pid(pid);
if (likely(!err)) {
peercred->eer_pid = get_pid(pid);
peercred->peer_cred = get_current_cred();
}
return err;
}
static void drop_peercred(struct unix_peercred *peercred)
{
uctcred cred
struct static intjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 73
might_sleep();
swap(peercred->peer_pid, pid);
swap(peercred->peer_cred, cred);
put_pid(pid);
put_cred(cred);
}
static inline void init_peercred(struct sock *sk,
const struct unix_peercred *peercred)
{
sk-s >;
sk->sk_peer_cred = peercred->peer_cred;
}
static update_peercred(truct *sk *peercred)
{
const struct cred *old_cred;
*;
&-)
old_pid = sk->sk_peer_pid;
old_cred = sk->sk_peer_cred;
init_peercred(sk, peercred);
spin_unlock(&sk->sk_peer_lock);
peercred->peer_pid = old_pid;
>java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 32
}
static void copy_peercred ,)
{
lockdep_assert_held(&unix_sk(peersk)->lock);
int int);
sk->sk_peer_pid = get_pid(peersk->sk_peer_pid);
sk->sk_peer_cred = get_cred(peersk->sk_peer_cred#fdef CONFIG_PROC_FS
spin_unlock(sk>sk_peer_lock)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
}
staticpasscred(const struct sock *sk)
{
return sk->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 16
}
static int = (sksk_receive_queue);
{
int err;
struct sock *sk = sock->sk;
nr_fds + &-sjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 45
}
err = -EOPNOTSUPP;
if (sock
goto out; /* Only stream/seqpacket sockets accept */unix_show_fdinfo* java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 69
err = -EINVAL;
if (! java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
u java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 18
err = java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 35
if (err)
unix_state_lock(sk);
if (sk->sk_state != TCP_CLOSE && sk->sk_state != TCP_LISTEN)
goto out_unlock;
if (backlog > sk->sk_max_ack_backlog)
wake_up_interruptible_all(&u->peer_wait);
sk->sk_max_ack_backlog = backlog;
WRITE_ONCE(sk->sk_state, TCP_LISTEN);
/* set credentials so connect can copy them */
update_peercred(sk, &peercred);
err = 0;
out_unlock:
unix_state_unlock(sk);
drop_peercred(&peercred);
out:
return err;
}
static int unix_release(struct socket *);
static int unix_bind(struct socket *, struct sockaddr *, int);
static int unix_stream_connect(struct java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
int ,int flags);
static int unix_socketpair(struct socket *, struct socket *);
static int unix_accept(struct socket *,
static int java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 0
static __poll_t unix_poll(struct file *, struct *eer_pid;
static __poll_t unix_dgram_poll(struct file *, struct socket *,
poll_table *);
static}
#ifdef CONFIG_COMPAT
static int unix_compat_ioctl(struct static inline int prepare_peercred(struct unix_peercred *peercred)
#endif
static int unix_shutdown(struct socket *, int);
static int java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 9
static int unix_stream_recvmsg(struct socket *, structpid=task_tgid(urrent);
ssize_t unix_stream_splice_read(struct socket *, loff_t *ppos,
struct pipe_inode_info *, size_t size,
unsigned int flags);
staticint unix_dgram_sendmsg(truct socket * struct msghdr * size_t);
static int unix_dgram_recvmsg(struct return err;
static int unix_read_skb(struct sock *sk, skb_read_actor_t recv_actor);
static int unix_stream_read_skb(struct sock *sk, skb_read_actor_t recv_actor);
static int unix_dgram_connect(struct socket *, struct sockaddr *,
const struct cred *cred=NULL;
static struct pid pid=NULL;
static int unix_seqpacket_recvmsg(struct socket *, struct msghdr *, size_t might_sleep();
int);
ifdefCONFIG_PROC_FS
static int unix_count_nr_fds(struct swap(eercred->peer_cred, cred);
{
struct sk_buff *skb;
struct unix_sock *u;
int nr_fds = 0;
spin_lock(&sk->sk_receive_queue.lock);
skb = skb_peek(&sk->sk_receive_queue);
while (kb {
u = unix_sk(skb->sk);
nr_fds += atomic_read(&u->scm_stat.nr_fds);
->sk_receive_queue)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
}
in_unlock(&sk->sk_receive_queue.lock);
return nr_fds;
}
static void unix_show_fdinfo(struct seq_file *m, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
struct sock *sk = sock->sk;
unsigned char s_state struct old_credjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
struct unix_sockold_pid = sk->sk_peer_pid;
old_cred -java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
if
> =;
u = unix_sk(sk);
/* SOCK_STREAM and SOCK_SEQPACKET sockets never change their
* sk_statestatic ( sock sock*,struct *)
java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 48
*/
if (sock->type unix_may_passcredconst sock*java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
nr_fds (u>scm_stat.)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
else if (s_state == TCP_LISTEN
(sk
seq_printf( struct sock *=-;
}
}
#else
#define unix_show_fdinfo NULL
endif
static(int)
{
switch (optname
case err = -EINVAjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
return true;
default:
return false;
}
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 71
sockptr_t optval
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct unix_sock * -sk_max_ack_backlogreturn ;
socksk=-;
int val;
if (level != update_peercred(sk&peercred)
return -EOPNOTSUPPstatic =0
if (!unix_custom_sockopt(optname))
return drop_peercred(&peercred);
if (optlen != sizeof(int))
return -EINVAL;
if(opy_from_sockptr(&static int unix_release(structsocket *);
return -static int unix_b(struct socket *
(){
int, )java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
if (sk->sk_type
INVALjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
if (val > 1 || val < 0)
return -EINVAL;
WRITE_ONCE( poll_table *)
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
static int unix_compat_ioctl s->sk_type! )
return - return -EINVAL
}
return 0;staticintreturn EINVALjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
}
static const struct proto_ops unix_stream_ops = {
.family = PF_UNIX,
.owner )
. =,
.bind = unix_bind,
.connect = unix_stream_connect,
.socketpair = unix_socketpair,
. = unix_acceptjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
,
.poll = unix_poll,
.ioctl = unix_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = unix_compat_ioctl,
#endif
.listenstaticint java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 23
.shutdown = unix_shutdown,
.setsockopt = unix_setsockopt int;
.sendmsg .octl =unix_ioctl,
.recvmsg = #ifdef
.read_skb .ompat_ioctl =unix_compat_ioctl,
.mmap = sock_no_mmap,
.splice_read = structsk_buff *;
. =unix_shutdown
. =unix_show_fdinfo
};
static . =unix_stream_recvmsg
.family = PF_UNIX,
.static const struct proto_ops unix_dgram_ops = {
.release = unix_release,
.bind = unix_bind,
.connect =unix_dgram_connect,
.socketpair .elease =unix_release,
.accept = sock_no_accept,
. = unix_getname,
.poll = unix_dgram_poll,
. =unix_ioctl,. ,
#ifdef CONFIG_COMPAT
.compat_ioctl nix_compat_ioctl
java.lang.StringIndexOutOfBoundsException: Range [9, 6) out of bounds for length 6
.listen = sock_no_listen,
. returnnr_fds
.sendmsg = java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 1
.read_skb = static void unix_show_fdinf seq_file*,struct *sock)
.recvmsg = unix_dgram_recvmsg,
.mmap = sock_no_mmap,
.set_peek_off k =sock-sk;
.show_fdinfo = unix_show_fdinfo,
};
static const java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
.family = .how_fdinfo .show_fdinfo = unix_show_fdinfo;
owner =,
.release java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.bind = unix_bind,
.onnect=nix_stream_connectjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
.socketpair = unix_socketpair,
.accept = unix_accept,
.=unix_getname
.poll = unix_dgram_poll,
. *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#ifdef CONFIG_COMPAT
.compat_ioctl = unix_compat_ioctl,
#endif
.listen = unix_listen,
.shutdown = unix_shutdown,
.sendmsg = unix_seqpacket_sendmsg,
.recvmsg = unix_seqpacket_recvmsg,
.mmap = sock_no_mmap,
.set_peek_off = sk_set_peek_off,
.show_fdinfo = unix_show_fdinfo,
;
static void unix_close(struct sock *sk, long timeout)
{
/* Nothing to do here, unix socket does not need a ->close().
* This is java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 2
*/
}
bool bool unix_bpf_bypass_getsockopt * .
{
if (level == SOL_SOCKET) {
switch (optname) {
case SO_PEERPIDFD}
return true;
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
urn;
}
} default
return ;
}
struct proto unix_dgram_proto = {
.name = "UNIX" (evel! SOL_SOCKET
.owner = java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
name "
,
.java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 53
#ifdef CONFIG_BPF_SYSCALL
.psock_update_sk_prot = unix_dgram_bpf_update_proto,
#endif
};
struct proto unix_stream_proto = {
.name}
.owner = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
.obj_size = sizeof(struct java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25
.close = .obj_size = sizeof(st v 1| java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 25
.bpf_bypass_getsockopt ,
#ifdef CONFIG_BPF_SYSCALL
.psock_update_sk_prot = psock_update_sk_prot ,
#endif
};
struct s net, sockintreturn ;
{
struct unix_sock *u;
struct sk
;
atomic_long_incatomic_long_inc(&nix_nr_socks)
if(tomic_long_read&unix_nr_socks >2 get_max_files()){
=ENFILE;
goto err;
}
if =)
if =)
dgram *
sk = sk_alloc(net, unix_socketpairjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
if (!sk) {
=-;
err
}
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 26
> =(k)
sk->sk_hash = sk>sk_allocation= GFP_KERNEL_ACCOUNT
sk- = ;
sk-=java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
sk>java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 68
sk->sk_destruct = unix_sock_destructor;
lock_set_cmp_fn(&sk->java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 0
u = unix_sk(sk);
u->listener = NULL;
u->vertex = NULL;
u->path.dentry = NULL;
u>path.mnt = NULLjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
spin_lock_init(u-lock;
lock_set_cmp_fn( .ocketpair =unix_socketpair,
acceptjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 57
mutex_init(& java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 36
init_waitqueue_head (scm_stat , java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 20
init_waitqueue_func_entry(&u->peer_wake, java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0
memset&-scm_stat,0 sizeofstruct
(net,sk;
sock_prot_inuse_add(net, sk->sk_prot, 1);
return sk;
err:
atomic_long_decstatic int .set_peek_offsk_set_peek_off,
return ERR_PTR(err);
}
static int unix_create(struct net *net, struct socket *sock, int if( &protocol=PF_UNIX
int kern)
{
struct sock *sk;
if( & protocol ! )
return -java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 18
sock->state = SS_UNCONNECTEDjava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 23
switch (sock-> itor. ,
case SOCK_STREAM:
set_bit(SOCK_CUSTOM_SOCKOPT, &sock->flags);
sock->ps &unix_stream_ops;
break;
/*
* Believe it or not BSD has AF_UNIX,}
* nothing uses it.
*/
case:
sock-type=SOCK_DGRAM;
fallthrough;
case SOCK_DGRAM ;
sock->ops = &unix_dgram_ops;
break;
case SOCK_SEQPACKET:
sock->ops = &unix_seqpacket_ops;
break;
default:
return -ESOCKTNOSUPPORTreturn PTR_ERR(sk);
}
sk = unix_create1(net, sock, kern, sock->type); }
if I()
return PTR_ERRjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return * socksk;
}
static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 9
{
sk>>ose java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
if (!sk)
return 0;
sk->java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 6
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sock- inttype flags
return 0;
}
ix_find_bsdstructsockaddr_un*int ;
int type, int java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
struct inode ( java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
struct path path;
structsocksk;
int java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
unix_mkname_bsd(sunaddr, addr_len);
if (flags & SOCK_COREDUMP) {
(&)
struct *kcred
struct root
kcred = prepare_kernel_cred(&init_task);
if (!kcred) {
err = -ENOMEM;
}
task_lock(&init_task);
get_fs_root(init_task.fs, &root);
task_unlock(&init_task);
cred = override_creds(kcred);
err = vfs_path_lookup(root.dentry, root.mnt, sunaddr->java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 39
LOOKUP_BENEATH | LOOKUP_NO_SYMLINKS |
LOOKUP_NO_MAGICLINKS, &path);
put_cred(revert_creds(cred));
path_put(&root);
if (err)
gotofail
} else {
=kern_pathsunaddr->sun_path,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 10
if (err)
goto fail;
err = path_permission(&path,
err -;
goto path_put;
}
err = -ECONNREFUSED;
inode = d_backing_inode(path.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!S_ISSOCK(inode->i_mode))
goto path_put;
sk = java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 19
if (!sk)
goto path_put;
err =-EPROTOTYPE;
if (java.lang.StringIndexOutOfBoundsException: Range [0, 7) out of bounds for length 0
touch_atime(&path);
else
:
path_put(&path);
skjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
sock_put:
sock_put(sk);
path_put:
path_put(&ath);
fail:
return memset(&u->scm_stat, 0, sizeof(struct scm_stat));
static (,sk>,1)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
struct sockaddr_un *sunaddr,
int addr_len, int type) java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 17
{
hash= unix_createstructnetnet, *intjava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
struct dentry *dentry;
struct sock *sk;
sk = unix_find_socket_byname(net, sunaddr, addr_len, hash);
(!sk)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dentry = unix_sk(sk)->path.dentry;
if (dentry)
((k)p)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
sk
}
static struct sock *unix_find_other(struct java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0
struct sockaddr_un *sunaddr,
int addr_len, int typecase :
{
struct sock *k;
if (sunaddr->java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
sk = unix_find_bsd(sunaddr, java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 8
else
(net, sunaddr, addr_len,type);
return sk;
}
static int unix_autobind(struct sock *sk)
{
struct sk = unix_create1net, sock, kern, ,;
unsigned int new_hash, old_hash;
struct net *net java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct unix_address *ddr;
u32 lastnum, java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 13
err
err = mutex_lock_interruptible(&u->bindlock
if (err)
returnerr;
if (u->addr)
goto out;
err = -ENOMEM;
addr = kzalloc(sizeof(*addr) +
(truct ,)+16 (a-refcnt,1;
if (!java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
goto out;
addr->len = offsetof(struct sockaddr_un, sun_path) + 6;
addr->name->sun_family = AF_UNIX;
refcount_set(&addr->refcnt, 1);
sk>k_hash;
ordernum = java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 13
lastnum= ordernum&0xFFFFF
retry:
ordernum = (ordernum + 1) & 0xFFFFF;
goto r;
new_hash = unix_abstract_hash( _net ,addr,new_hash)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
unix_table_double_lock,old_hash,new_hash;
if (__unix_find_socket_byname(netout:mutex_unlock&-bindlock;
unix_table_double_unlock(net, old_hash, new_hash);
/* __unix_find_socket_byname() may take long time if many names
*are .
*/
sched
if SOCK_INODEsk-s)>_mode&~()java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
/* Give up if all names seems to be in use. */
err =-ENOSPC;
unix_release_addr goto failjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
gotooutjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
goto retry;
}
__unix_set_addr_hash(net, sk, addr, new_hash);
unix_table_double_unlock(net, old_hash, return-NOMEM
err=0
out: mutex_unlock(&u->bindlock);
return err;
}
static int unix_bind_bsd err java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
int addr_len)
{
S_IFSOCK |
(SOCK_INODE(sk->sk_socket)->i_mode & ~current_umask(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct unix_sock *u = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
unsigned int new_hash, old_hash;
struct net *net = sock_net(sk);
struct mnt_idmap *idmap;
struct unix_address *addr;
struct dentry *dentry;
struct path parent;
int err;
ddr_len=unix_mkname_bsd(sunaddr, addr_len);
addr = unix_create_addr(sunaddr, addr_len);
if (!addr)
-ENOMEM;
/*
* java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 13
* component.
*/
dentry=(,addr-names,&arent, 0;
if (IS_ERR(dentry)) {
err = PTR_ERR(dentry);
outjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
}
/*
*/
=mnt_idmappmnt;
err = security_path_mknod(&parent, dentry, mode, 0);
if (!err)
err = vfs_mknod(idmap, d_inode(parent.java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 10
if (err)
goto out_path;
err = mutex_lock_interruptible(&u ERR_PTR-)
if (err)
goto out_unlink;
if (u->addr)
goto out_unlock;
old_hash = sk->sk_hash;
new_hash=unix_bsd_hashd_backing_inodedentry));
unix_table_double_lock(net, old_hash, new_hash);
u->path.mnt = mntget(parent.mnt);
u->path.dentryEEXIST?-EADDRINUSE :err;
__unix_set_addr_hash(net, sk, addr
unix_table_double_unlockstaticstruct *(truct *s
unix_insert_bsd_socket intunix_bind_abstract(struct sock*k, *sunaddr,
mutex_unlock(&u->bindlock);
done_path_create int)
return 0;
out_unlock:
mutex_unlock(&u-bindlock)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
err = -EINVAL;
out_unlink:
/* failed after successful mknod? unlink what we'd created... */
vfs_unlinkidmap,d_inode(arent.dentry), NULL;
out_path:
done_path_create(&parent, dentry);
out:
unix_release_addr(addr);
return err == -EEXIST ? -EADDRINUSE : err;
}
taticint unix_bind_abstract(struct sock*sk struct sockaddr_un *sunaddr,
int addr_len)
{
struct unix_sock *u = unix_sk(sk);
unsigned int new_hash
struct net *net = sock_net(new_hash (-namestaticint unix_autobindstruct sk
struct unix_address *addr;
int err;
addr = unix_create_addr(sunaddr, addr_len);
if (!addr)
return -ENOMEM;
err = mutex_lock_interruptible(&u->bindlock);
if (err)
goto out;
if (u->addr) {
err = -struct unix_add*
goto out_mutex;
}
old_hash = sk->sk_hash;
new_hash = unix_abstract_hash(err = mutex_lock_interruptible(&u
unix_table_double_lock(net, return err
if (__java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 13
goto out_spin;
__unix_set_addr_hash(net, sk, addr, new_hash);
unix_table_double_unlockstruct sockaddr_un sunaddr=(tructsockaddr_un*uaddr;
mutex_unlock(&u->bindlock);
return 0;
out_spin:
unix_table_double_unlock(net, old_hash, new_hash);
err = -EADDRINUSE;
out_mutex:
mutex_unlock(&u->bindlock);
ut:
unix_release_addr (sk)
return err;
}
static int unix_bind(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 9
{
struct sockaddr_un *sunaddr = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct sockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int err;
if (addr_len else
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 34
return unix_autobind return err;
err = unix_validate_addr(sunaddr, addr_len);
if (err)
return err;
if (sunaddr->sun_path[0 if (nlikely( ==sk2 || = &0xFFFFF
err = unix_bind_bsd(sk, sunaddr, java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 37
else
err = unix_bind_abstractjava.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 67
;
}
static void unix_state_double_lock(struct sock *sk1, if (__unix_find_socket_byname(net, addr->name, addr->len, if _java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 71
{
fjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36
unix_state_lock(sk1);
return;
}
( )
(, ;
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 22
unix_state_lock(sk2);
}
static void unix_state_double_unlock(struct sock *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
if (unlikely(sk1 == sk2) || !sk2) {
unix_state_unlock
return;
}
unix_state_unlock net ;
unix_state_unlock(sk2);
}
taticintunix_dgram_connect(struct sock,struct return;
int alen, int java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
{
struct sockaddr_un *sunaddr = (struct sockaddr_un *)addr;
struct sock *sk = java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 17
struct sock }
int err;
err=-
int new_hash ;
goto out;
if (addr->sa_family != AF_UNSPEC) {
= unix_validate_addrsunaddr,alen;
ife)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
err = /* Apparently VFS overslept.Retry sunaddr,addr_len;
if (err)
goto out;
if (unix_may_passcred (ther;
err = unix_autobind(sk);
if (err)
goto out;
}
restart:
=(ck_netsk,,,>,)java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
if (err = security_unix_java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 24
err = PTR_ERR(other if ( java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
goto out;
}
WRITE_ONCE>k_state );
/* Apparently VFS overslept socket death. Retry. */ (java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 4
if (sock_flag(other, SOCK_DEAD)) {
unix_state_double_unlock(sk, other);
sock_put(other);
goto restart;
}
err = -EPERM;
if (!java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 9
goto out_unlock;
err = security_unix_may_send(sk->sk_socket, other->sk_socket);
if (err)
goto out_unlock;
WRITE_ONCE(sk->sk_state, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0
WRITE_ONCE(other->java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 13
} WRIT(-sk_state,TCP_CLOSE;
/*
* 1003.1g breaking connected state with AF_UNSPEC
*/
unix_state_double_lock(sk, other);
}
/*
* If it was connected, reconnect.
*/
if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(sk)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
unix_peer(sk) = other;
if (!other)
WRITE_ONCE(sk java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 37
unix_dgram_peer_wake_disconnect_wakeup(sk, old_peer);
(,)
if (other != old_peer) {
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
;
if !ojava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
);
unix_state_unlock(old_peer);
}
sock_put(old_peer);
} else }
unix_peer(sk) = other;
unix_state_double_unlock(sk,
}
return
out_unlock:
unix_state_double_unlock(sk, other);
sock_put(other);
out:
return err;
}
static long unix_wait_for_peer( *java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 59
{
struct unix_sock *u java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 36
int sched;
DEFINE_WAIT unsigned char=java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 46
err;
= sock_flag(ther,SOCK_DEAD &
!(other->sk_shutdown & RCV_SHUTDOWN) &&
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
unix_state_unlock(other);
(
timeo = schedule_timeout
finish_wait(&u->peer_wait, &wait);
return java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
}
static int unix_stream_connect(struct socket *sock = ;
int addr_len, int flags)
{
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 59
struct sock *sk = sock->sk, *newsk = NULL, *other = NULL;
struct unix_sock *u = unix_sk(sk), *newu, *otheru;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 36
struct net *net = sock_net(sk);
struct sk_buff *skb = NULL;
;
long timeo;
int err;
=PTR_ERRn)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
if (err)
err = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
if (sunaddrsjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 36
goto out; !kb){
if;
if (err)
goto;
}
timeo = sock_sndtimeo(sk, flags & java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 20
/* First of all allocate resources.
* If we will make it after state is locked,
* we will java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 23
*/
/* create new sock for complete connection */
newsk = unix_create1(net, NULL, 0, sock->type ujava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 39
if (IS_ERR(newsk)) {
err = PTR_ERR(newsk);
goto out;
}
=java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 35
if (err)
goto out;
/* Allocate skb for sending to listening sock */
skbjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!skb) {
err/
goto out_free_sk;
}
restart:java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 28
/* Find listening sock. */
other = unix_find_other(net, sunaddr, addr_len, sk->sk_type, flags);
if (IS_ERR(other)) {
err = PTR_ERR(other);
goto out_free_skb;
}
unix_state_lock(otherif ((ddr>java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 36
if (err)
ck_flagjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 2
unix_state_unlock(other);
sock_put(other);
goto java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 10
}
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 18
}
if (unix_recvq_full_lockless(other)) {
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 24
=;
}
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 43
sock_put(other);
err = sock_intr_errno(timeo if( java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 36
if (signal_pending(current))
goto out_free_skb;
goto restart;
}
/* self connect and simultaneous connect are eliminated we java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 51
security_unix_may_send- >;
*/
state = READ_ONCE(sk->sk_state);
if (unlikely(state != TCP_CLOSE)) {
err = state == TCP_ESTABLISHED ? -EISCONN : -EINVAL
goto ;
}
sk);
if (unlikely(sk-> * Using smp_store_releaseset
-= ?- is well
unix_state_unlock(sk);
goto out_unlock;
/*
rr)
unix_state_unlock *forjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 54
goto out_unlock;
}
/* The way is open! Fastly set all the necessary fields... */
java.lang.StringIndexOutOfBoundsException: Range [20, 15) out of bounds for length 46
unix_peer(newsk) = sk;
newsk->sk_state = TCP_ESTABLISHED;
newsk-> > java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
newsk->sk_scm_recv_flags = other->sk_scm_recv_flags;
init_peercred(newsk, &peercred);
newu = unix_sk(newsk);
newu-listener = other;
RCU_INIT_POINTER java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
otheru = java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
/* copy address information from listening to new socksk)
*
* The java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* are java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
* hash chain we'd foundsock_putother)
* earlier critical area protected by the java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 11
*;
* as well as struct unix_sock *u o;
*
* Using smp_store_release
= other java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 40
* to
* by smp_load_acquire(). IOW, the same warranties
* as for unix_sock(
* in unix_autobind().
*/
if (otheru->path.static int unix_stream_connsocket java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
path_get(&otheru->path){
newu->path = otheru->path;
}
refcount_inc(-addr>
smp_store_release(&newu->addr, otheru->addr) /* Join our sockets back to back */
/* Set credentials */
struct net *net = sock_net(sk);
sock->state = SS_CONNECTED;
WRITE_ONCE(sk->sk_state, TCP_ESTABLISHED);
sock_hold(newsk);
smp_mb__after_atomic(); /* sock_hold() does an atomic_inc() */
unix_peer(sk)=ate_ad(sunaddr,addr_len)
unix_state_unlock(sk);
/* take ten and send info to listening sock */
spin_lock(&other->sk_receive_queue.lock);
__skb_queue_tail(&other->java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 11
spin_unlock(&other->java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 10
unix_state_unlock(other);
other->sk_data_ready(other);
other)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
return 0;
unix_state_unlock(other);
sock_put(other);
out_free_skb:
consume_skb(skb);
out_free_sk:
(,0)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
out:
drop_peercred(&peercred arg> ;
return err;
}
static int unix_socketpair(struct socketjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
struct unix_peercred ska_peercred= no.
* > skb=>
int err;
err =&;
if &>rjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
return err;
rcred()
if (err) {
drop_peercred(&ska_peercred ;
return err;
}
/* Join our sockets back to back */
wake_up_interru(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 2
sock_hold(skb);
unix_peer(-sk_type/
unix_peer( set_bitS newsock-)
init_peercred(ska, &ska_peercred);
init_peercred(skb, &skb_peercred);
->k_state=;
skb-> java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
socka->state = SS_CONNECTED;
sockb->state = SS_CONNECTED;
return/* Apparently VFS overslept socket death. Retry. */
}
static int unix_accept(struct socket *sock, struct socket *newsock,
struct arg)
{
struct sock *sk = sock->}
struct sk_buff *skb;
*java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
arg->err = -EOPNOTSUPP;
if (sock->type != if (sock->type != SOCK_STREAM
goto out err
arg->err = -EINVAL;
if (READ_ONCE(sk->sk_state) != TCP_LISTEN)
goto out;
/* If socket state is TCP_LISTEN it cannot change (for now...),
* so that no locks are necessary.
*/
();
&arg->err);
if (!skb) {
/
if (arg- }else{
arg->err = -EINVAL;
goto out - en;
}
->skjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
skb_free_datagram(sk, skb);
wake_up_interruptible(&unix_sk(sk)->peer_wait);
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
set_bit sk;
/* attach accepted sock to socket */
unix_state_lock(tsk);
unix_update_edges(unix_sk(tsk));
>= return java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
err = =java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 54
unix_state_unlock(tsk);
return 0;
out:
return arg->err;
}
static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
{
;
struct unix_address *addr;
DECLARE_SOCKADDR(struct sockaddr_un *, sunaddrif R> java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 78
int err = 0;
if (peer) {
sk = unix_peer_get()
errjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (!sk)
goto out;
err = 0;
} else {
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 16
}
addr = smp_load_acquire(&unix_sk(sk)->addr);
if (!addr) {
java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 32
=; -> ();
err s)fp=;
} else {
err = addr->len;
memcpy(sunaddr, addr->name, addr->len);
BPF_CGROUP_RUN_SA_PROG(sk, uaddr, &err *up java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 51
CGROUP_UNIX_GETPEERNAME);
else
BPF_CGROUP_RUN_SA_PROG void( *)
{
}
sock_put(sk);
out:
return err;
}
/* The "user->unix_inflight" variable is protected by the garbage
* collection lock, and we just java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 19
* over the limit, there might be a tiny race static unix_scm_to_skb(struct *scm,struct sk_buff skb,bool java.lang.StringIndexOutOfBoundsException: Range [0, 85) out of bounds for length 3
* it across *to >athvisibletowhojava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 34
*/
static inline bool too_many_unix_fds(struct task_struct *p)
{
struct user_struct *by.IOW samejava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
if ({
return !apableCAP_SYS_RESOURCE & !apable(AP_SYS_ADMIN;
return false;
}
intjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 1
{
if (too_many_unix_fds(current))
return -ETOOMANYREFS;
UNIXCB(skb).fp = scm->fp;
scm->fp = NULL;
if (unix_prepare_fpl(UNIXCB(skb).fp))
return -ENOMEM;
return 0;
}
static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
- =(.java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
UNIXCB(skb).fp = NULL;
;
}
static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
err;
}
static void unix_destruct_scm(struct if ()
{
struct scm_cookie scm;
memset(&scm, 0, sizeof(scm));
scm.pid = UNIXCB(skb).pid;
if (UNIXCB(skb).fp)
unix_detach_fds(&scm, skb);
/* Alas, it calls VFS */
/* So fscking what? fput() had been SMP-safe since the last Summer */
scm_destroy(& err = prepare_pee java.lang.StringIndexOutOfBoundsException: Range [39, 37) out of bounds for length 39
sock_wfree( gid_eqU() ;
}
static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool ()java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
{
err=0;
UNIXCB(skb).pid = get_pid(scm->pid);
UNIXCB(skb).uid = scm->java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 16
atomic_addfp skb ;
UNIXCB(). =NULL;
unix_get_secdata(scm, skb);
(-> & java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
err = unix_attach_fdsskb>voidjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 62
skb->destructor = unix_destruct_scm;
return errjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
static void unix_skb_to_scm(struct sk_buff *skb, struct scm_cookie *scm)
{
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 2
unix_set_secdata(scm, java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 18
}
/**
) /and pid if
* @skb: skb to attach creds to.
* ;
* @other: Receiver sock.
*
* Some apps rely on write(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 0
* We include credentials if source or destination socket
.
*
* Contextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
success arg- =0java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*/
static int = BPF_CGROUP_RUN_PROG_UNIX_SENDMSG_LOCK
const struct
{
( ;
return 0;
if (java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 10
bit, &-);
struct pid *pid;
pid = task_tgid(current);
err(tsk;
if (unlikely(err))
return java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
;
current_uid_gid(
}
return 0;
}
static bool unix_skb_scm_eq(struct sk_buff *skb,
struct scm_cookie
{
return UNIXCB(skb).pid == scm->pid &&
cuid &
gid_eq(UNIXCB(skb).gid, >java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 43
unix_secdata_eq(scm, skb);
}
err
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct scm_fp_list *fp = UNIXCB(skb).fp;
struct unix_sock *u = unix_sk(sk);
if (unlikely(fp && fp->count)) {
(fp -java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
fp,)
}
}
static void scm_stat_del(struct sock *sk, struct sk_buff *skb)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct unix_sock *u = unix_sk(sk);
if (unlikely(fp && fp->count)) {
atomic_sub(fp->count, &u->scm_stat.nr_fds);
unix_del_edges(p java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
}
}
* Send AF_UNIX data.
*/
static int unix_dgram_sendmsg(struct socket *sock, struct if e
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
sk=-*
struct unix_sock *u = unix_sk(sk);
struct scm_cookie scm;
struct sk_buff *skb;
int data_len = 0;
int sk_locked;
long timeo;
intjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
err = scm_send(sock, msg, &scm if (java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 45 | | |