Awesome videos, why did he stop uploading videos 😮. I just learnt about this KZbin channel. Thank KZbin algorithm for recommending this.
@amirhossein-zu1yv6 күн бұрын
Your voice is not suitable Especially for those whose mother tongue is not English
@veal425 күн бұрын
Why only 35 likes?
@alishmod530Ай бұрын
please keep creating video like this
@ideaparkccАй бұрын
absolutely brilliant deep dive the linux network
@jeffrey-antonyАй бұрын
Thanks for the nice video tutorial. Which tool did you use to draw on the screen ?
@robertdreyfus5436Ай бұрын
Why not mention in this second video that you need to : (gdb) set enviroment GLIBC_TUNABLES glibc.malloc.tcache_count=0 (gdb) set enviroment GLIBC_TUNABLES glibc.malloc.mxfast=0 so that the free() call will use an unsorted bin on the stack and demonstrate the behaviour you show. You only mention this vital information in the third video!!!
@djtomoy2 ай бұрын
Very inefficient, I would have done it much differently myself
@AmolGautam2 ай бұрын
Thanks a ton for this video.
@kimaegaii2 ай бұрын
Thank you. Is there any video that might prep us for this video. I've been working with Linux a long time , but I got lost with what the program you're using and sort of had more questions along the way of what's going on. Sorry and thanks.
@tranminhquan17522 ай бұрын
as i know, process will have its own virtual map, why its not start with 0x00000?
@Redgum-z3i2 ай бұрын
Wow! I now understand so many things taught in computer networks class. It was all imagination to me before. Thankyou
@AmolGautam2 ай бұрын
This was in really helpful. Thanks
@XYZ567712 ай бұрын
Indeed, this kind of teaching is what we need. Thank you!
@human4566vv2 ай бұрын
thanks
@darkside3ng2 ай бұрын
Amazing!
@drivetrainerYT2 ай бұрын
Wow. Subscribed.
@aospware2 ай бұрын
Tons of books and videos have never been able to do this ever. Keep on this great work. I wish to see more such stuff from you.
@Corteum2 ай бұрын
How is it different to how Windows or MacOS handles it?
@marcusl.18743 ай бұрын
Very great Introduktion. Many thanks for it
@thedanielspindler3 ай бұрын
Thank you, this is an amazing video. Very well presented and explained. Keep up the good work!
@pardeepattri3274 ай бұрын
(gdb) p main_arena 'main_arena' has unknown type; cast it to its declared type (gdb) p mp_ 'mp_' has unknown type; cast it to its declared type (gdb) (gdb) show version GNU gdb (GDB) Red Hat Enterprise Linux 8.2-19.el8 Any idea why I am getting these errors ?
@os_security4 ай бұрын
Thanks a lot. I have just one suggestion: It would have been better if you had used x/gx instead of x/wx to show the contents of heap addresses since you are working on a 64-bit machine.
@os_security4 ай бұрын
Your videos are truly invaluable. Thank you for providing such thorough and insightful explanations of Linux’s inner mechanics.
@flintthuang4 ай бұрын
starting from 17:10, why readfds=0x8 means fd 3?
@flintthuang4 ай бұрын
i got it, 0x8 = 1000, 1 is at bitmap position 3. with the same logic 0x11 = 10001, it contains fd 4 and fd 0
@ganeshkirshna5 ай бұрын
This is really a great deep dive video i have ever seen, just wanted to know at timefram 21:56, you have mentioned that it will create a new socket for data transfer? but generally TCP relays on the same socket for listening and data transferring right? Can you please advice me on this?
@deeplinux22485 ай бұрын
Very good question. In the tcp protocol we have two kinds of sockets, listen and data sockets. A listen socket is only applicable on the server side and is unique per server ip/port. The data socket is one per source dest ip port quadruple. The listen socket is only there to accept new connection requests. Once a connection request is received the kernel creates a new data socker per incoming ip port. From the application side you wont see these different sockets.
@EclipseTraceCompass5 ай бұрын
Hey, as the Trace Compass official account, I approve of this message! at 4:30, you can go to IRQ analysis instead of looking at the /proc directory. Also, I think we recognize the voice!
@abhinavjain92645 ай бұрын
Okay so I think all the viewers agree that this is an extremely underrated channel. @Deep Linux, please share your LinkedIn, want to add you as a connection 😅
@epolpier2 ай бұрын
Why ? Three od Nothing deep about Linux here, it's just the surface...
@AxuraSec5 ай бұрын
I have read some other articles about how the `malloc` finds the suitable chunk that is described different from the workflow as introduced in the video at 11:45. The other article introduces that when we execute `malloc` to request a specific size of memory, the libc guides us through the sequence of 'tcache -> fastbin -> small bin -> unsorted bin -> large bin'. I does not match my learning in this video so I came back and watch again, confirm it's 'tcache -> fastbin -> unsorted bin -> small bin -> large bin' as introduced in the video (where the part `small bin` is different). May I ask which would be the standard condition?
@deeplinux22485 ай бұрын
I haven't double check what I am about to say with the source code, but according to my understanding, small and large bins lie at the same level of the hierarchy which is the last one. So the correct sequence should be tcache - fastbin - unsorted - lastly either of small or large bins depending on the size of the requested chunk. The only difference between small and large bins is the chunk size cached there.
@AxuraSec5 ай бұрын
Thanks for your reply! I will take this answer and care about this when using gdb to go through them in different version of libc in the future@@deeplinux2248
@AxuraSec4 ай бұрын
@@deeplinux2248 I have dived deeper with the glibc source code and play around some heap exploitation with gdb. Then I think I should share some of my findings and thoughts as a feedback. The ptmalloc does operate differently with the _int_malloc & _int_free functions. It is indeed a very complicate system so that it's hard to conclude all the details in a video or a comment. Regarding to _int_malloc in some simple words to conclude, it firstly will search tcache bins, fastbins, smallbins for specific exact-fit free'd chunk inside them. The glibc source code describes that this procedure will be completed to match the small request first, because these bins are of fixed size so it is relatively fast. If _int_malloc cannot find a match with above searching, its behaviour will depend on our request size. 1. If it's a small request, namely under 0x400 bytes, the heap allocator searches the unsorted bins first. If there's only one last remainder chunk inside the unosrted bin, this chunk will be returned to us only if it's exact-fit (glibc: /* Fill cache first, return to user only if cache fills. We may return one of these chunks later. */). If not, when the last remaidner chunk is larger than our request, it will be spillted into one of our request size and anther one as a new remaimder. The one of our request size will be unlinked and returned to us; the one as the new last remainder will go back to unsroted bin (as described in glibc: split and reattach remainder), then it seems to continue the binning process to place the remainder in S/L bins according the rest of the glibc code. At last if our request is larger than the last remaidner in the first place, the top chunk will answer our request (verified through gdb). 2. If it's a large request, namely over 0x400 bytes, it triggers malloc_consolidation first. This means when there are free'd chunks in fastbins (&av->have_fastchunks), adjacent chunks in fastbins will be consolidated into bigger chunks (malloc_consolidate (av)). And the new chunks and all chunks in fastbin will be moved to unsorted bin. Now if there's an exact-fit chunk match our reques size, it will be returned to us. Otherwise these chunks in unsorted bin will be placed in smallbins and largebins. Then we continue to search a fit in the S/L bins (there's also an exact-fit and best-fit problem here, if no exact-fit it will go for a best-fit to do the spliting and reattachment again according to a bitmap thing). If it's yet not satisfied, then comes to the job with top chunk and the rest. This is for now my understanding regarding on the heap management, not 100% sure it's the perfect answer. When I check the time stamp of the last comment, I cannot believe it's 3 weeks ago. Feeling like it has been months. Thanks for your videos to let me understand how it works when I don't have an image of what heap is about.
@AxuraSec5 ай бұрын
Finally come through the last one for the series. Thanks a lot for share knowledge. After this series now I have much better understanding for the heap `beast`. I believe I will come through this series again and again in the future and each time we shall have better understanding on the content. It's a pity that the videos could not gain its deserved attention, for now. Maybe it belongs to a small group of ppl who will need to have the fundamental knowledge of the deep part in computer science. A suggestion for media perspective that you may consider building a member communication something like discord, which benefits a lot for managing and expand specific audience group. Anyway, thank you for the videos and I will take time to go through other videos for sure
@AxuraSec5 ай бұрын
Having a break and leave a comment for the video definitely deserves more. I am on the way of digging out heap exploitation in pwn then I found this series. I cannot find any other video that explains so much and detailed on how the bins or chunks work and more importantly why they work this way. Also clear description on these basic concepts with demonstrating them along side with both source code structure and flows in gdb. And you cannot help appreciating how wonderful the author understands the whole system so that he can only explains this knowledge with such clear mind and passion. I think the reason of the low views on the video is exactly because it's indeed some tough content for most people who may suffer from understanding them. But once you make yourself go through it and I will recommend it as the most valuable learning resource for heap-related content. After viewing the first 3 videos I cannot sleep that night because just cannot stop picturing the contents in my head. And the first thing I got up next morning is to go through the first video again and clear out the doubts. If you think it's hard to understand, just need to be patient to break it down and go through it again and again. Keep it up or you will lose a great treasure in life.
@deeplinux22485 ай бұрын
Wow! thanks that is flattering.
@AxuraSec5 ай бұрын
Thanks for such an intelligent man willing to share his knowledge here
@AxuraSec5 ай бұрын
This video is damn good for explaining the heap architecture. Cant help to leave a command in the midway and now I go continue
@ricardorosa53155 ай бұрын
GOLD!!!!
@ttt19715 ай бұрын
🔥🔥🔥🔥
@ttt19715 ай бұрын
gold value content 🔥
@ttt19715 ай бұрын
awesome man, please continue posting !! 🔥🔥🔥
@johnangelo20005 ай бұрын
Please can you have a network events, skb_consume, soft_irq, napi as a separate video related to network card?
may i know , what will i learn from learnig these ? like how will it impact my learning in linux basically
@deeplinux22485 ай бұрын
Depends what your goal is in your Linux journey. A user or even a simple admin then probably not much. But if you debug kernel issues or write network software in the lower layers then you would not be asking this question😉
@PhillipMaii5 ай бұрын
great content, thanks!
@FakAr65 ай бұрын
Hello, thank you for this series, I really love it. Though there is one thing I don't understand in this video. After freeing b1(at 15:07), why did the head of the unsorted bin change to b1 ? I was expecting main_arena.bins[0].fd/bk to point to b1 and b1.fd/bk to point to main_arena.bins[0], as shown in the Azeria-Labs illustration.
@YuruCampSupermacy6 ай бұрын
Good job. Never thought I would learn about kernel functions from a YT short.
@4skinntim4207 ай бұрын
This is amazing content! I am amazed by the fact that I (a complete linux kernel newbie) can understand what is happening. The information presented here is very valuable to my research (I want to know how select/epoll works in regards to concurrency and multithreading). Keep up with the great work and can I ask a question - is 'softirq' some kind of lightweight kernel thread or what is it?
@deeplinux22487 ай бұрын
Thanks for the encouraging feedback. Softirq is not a kernel thread, it is simply an interrupt handler which serves software interrupts. These are generally functions which are called by the kernel when an interrupt is raised. A softirq has the seconds highest priority after hardirq which serves actual hardware interrupts coming from net or disk, for example. If you require some cobtext of execution in the kernel then you can use simple threads but in kernel space, or if you require a kernel routine then go with tasklets.
@氷語7 ай бұрын
Damn the bugs list is something I didn’t expect.
@GudinVladimir7 ай бұрын
Thanks! This is very useful material!
@PouriyaJamshidi7 ай бұрын
Mersi Vahid jan
@thapakazi_7 ай бұрын
woooooh, these are dope details. now I wanna learn more... thanks for sharing this resource 🙇♂