LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-16-2024, 02:01 AM   #1
totorlinux
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Rep: Reputation: 0
Question Security measure on interprocess communication


Hello all,

I am currently working on interprocess communication, and I am struggling to find information on this topic. How are interprocess communication secured (for internal communication, not over network sockets as an example) ? I am asking this question for any IPC (pipes, shared memory, ...).

Is there access rights defined between user process communication ? Is there an integrity check, or encryption ?

For an IoT that would use embedded linux, is there any point in implementing security for a homemade IPC protocol ? If the external interfaces are secured, then the IPC should not be exploitable for someone without at least user level of privilege access ?

Thank you for reading this topic and answering if you have some knowledge on the topic
 
Old 04-23-2024, 01:01 PM   #2
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Typically, you’d set things up so that only processes started by the same user can communicate with each other.

For example:

https://doc.qt.io/qt-6/qlocalserver....ketOption-enum
 
Old 04-24-2024, 01:30 AM   #3
lvm_
Member
 
Registered: Jul 2020
Posts: 940

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
Shared resources use the same security model as files e.g. man ipcmk - hence no specific mention. If you want anything on top of it - encryption, etc, you have to do it yourself, again, as with files.
 
Old 04-24-2024, 01:49 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
yes, it depends on you. If you want to send any information from A to B you need to protect it. (it is [almost] irrelevant if you use bluetooth, wifi, network, ipc or any other kind of communication).
 
Old 04-25-2024, 08:51 AM   #5
totorlinux
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Hello,

Thank you all for your answers. External interfaces such as Bluetooth, wifi, etc will ofc be protected (encryption, and for back end communication TLS for authentication). I want to focus on the internal communication of processes (for an IoT, one process responsible of external communication communicate internally with an other process responsible for making the IoT fulfill its mission).

From your answer Dugan, it would seem that access control is sufficient for IPC, but I would like to understand why is it necessary?

Ivm when you say they use the same security model as files, it is basically access control ? You define who can access which IPC ?

thank you again for answering this topic
 
Old 04-25-2024, 03:56 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,235

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by totorlinux View Post
From your answer Dugan, it would seem that access control is sufficient for IPC, but I would like to understand why is it necessary?
Because you don’t want users to connect to other user’s processes.
 
Old 04-29-2024, 02:30 AM   #7
totorlinux
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Yes for a multi-user space I understand. But in the case of an IoT device where people won't actually have a linux account (they will just interact with the object, but that is it) would you consider it necessary ?
 
Old 04-29-2024, 02:33 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,899

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
You need to protect it if there is any way (possibility) to log in or execute anything (remotely) on that device.
Otherwise you don't need to care about it.
 
Old 04-29-2024, 10:58 PM   #9
friendlysalmon8827
Member
 
Registered: Dec 2023
Distribution: Anfroid,Debian
Posts: 99

Rep: Reputation: 5
The level at which a device of any specification can be secured for the most part depends upon the amount of processing power and memory. These two metrics get progressively more pertinent when you start adding more and more complex levels of encryption ciphers. This is a problem because you're probably going to have limited access to the device once it is deployed.

To make the above determination we need the specifications of the SoC or embedded device that you planning to use for this operation so that we my further assist you in the trouble shooting and recommend a further path forward.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is interprocess communication Ashok_mittal Linux - Kernel 2 12-12-2007 04:04 AM
What is interprocess communication Ashok_mittal Linux - Newbie 1 12-12-2007 04:00 AM
Cross-platform interprocess communication ondrej.ilcik Programming 2 01-30-2004 04:04 AM
Interprocess Communication in linux. hemanexp Linux - Software 0 01-16-2004 06:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration