lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A3CE170.8030604@hartkopp.net>
Date:	Sat, 20 Jun 2009 15:17:36 +0200
From:	Oliver Hartkopp <oliver@...tkopp.net>
To:	Herbert Xu <herbert@...dor.apana.org.au>
CC:	Linux Netdev List <netdev@...r.kernel.org>
Subject: problem with 'net: Partially allow skb destructors to be used on
 receive path'

Hello Herbert,

i got a feedback on the SocketCAN users ML from Michel Marti that the can-raw
socket option CAN_RAW_RECV_OWN_MSGS is out of order since 2.6.30.

https://lists.berlios.de/pipermail/socketcan-users/2009-June/000959.html

Usually the user application does not get CAN frames back through the socket
it was originally sent:

static void raw_rcv(struct sk_buff *skb, void *data)
{
        struct sock *sk = (struct sock *)data;
        struct raw_sock *ro = raw_sk(sk);
        struct sockaddr_can *addr;

        /* check the received tx sock reference */
        if (!ro->recv_own_msgs && skb->sk == sk)
                return;

...

For another detail see can_send() at net/can/af_can.c

The needed sk reference in the rx path for omitting the own received messages
is killed by a new skb_orphan() call in net/core/dev.c introduced in 2.6.30:

"net: Partially allow skb destructors to be used on receive path"

http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=9a279bcbe347496799711155ed41a89bc40f79c5

I tried to follow your comment of the commit which looks mostly associated to
IP networking.

Do you have any idea how this currently killed functionality that bases on the
originator skb->sk could be fixed?

Suggestions:

1. omit the skb_orphan() for ARPHRD_CAN skbs
2. put the sk value in cb[]
3. anything else ???

Thanks,
Oliver

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ