The incident of mob lynching is when a group of people kills a person allegedly for an offence are usually based on some religious prejudice or rumour.
There is no present codified law against lynching in India as such, however, Section 223(a) of the Criminal Procedure Code, contains the provision for persons being charged for an offense jointly when they are accused of the same offence committed in the course of the same transaction which is applicable on two or more people.
The punishment for mob lynching is provided under the ambit of the following laws currently- Section 302 (murder), Section 304(culpable homicide not amounting to murder), Section 307 (attempt to murder), Section 323 (punishment for voluntary causing hurt), Section 323 (punishment for causing grievous hurt voluntarily) Section 147 (punishment for rioting), Section 148 (rioting armed with a deadly weapon), Section 149 (every member of unlawful assembly guilty of offence committed in prosecution of common object), Section 120B (parties participating in a criminal conspiracy) and Section 34 (acts done by several persons in furtherance of a common intention).
There is also “THE PROTECTION FROM LYNCHING ACT, 2017”. An act to provide for effective protection of the Constitutional rights of vulnerable persons, to punish acts of lynching, to provide for Special Courts for the expeditious trial of such offences, for the rehabilitation of victims of lynching and their families and for matters connected therewith or incidental thereto.
A three-judge Bench led by Hon’ble Chief Justice of India, Dipak Mishra condemned recent incidents of lynching and mob attacks against Dalit and minority community citizens of the country on 17th July 2018 and asked the Parliament to pass a law considering lynching as an offence separately and determine punishment regarding the same.
I hope this solves your query.